From 51bccd4e33505fdbeb83f819f0a0b8fbb0dc9e1d Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 24 Feb 2008 21:19:19 +0000 Subject: [PATCH] Combined two "if"s. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@183 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- Robots/parse_html.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Robots/parse_html.py b/Robots/parse_html.py index 137ebfa..57f6498 100755 --- a/Robots/parse_html.py +++ b/Robots/parse_html.py @@ -32,9 +32,9 @@ num_entity_re = re.compile("(&#[0-9]+;)") def recode_entities(title, charset): output = [] for part in entity_re.split(title): - if entity_re.match(part): - if part not in ("&", "<", ">", ""e;", " "): - part = entitydefs.get(part[1:-1], part) + if part not in ("&", "<", ">", ""e;", " ") and \ + entity_re.match(part): + part = entitydefs.get(part[1:-1], part) output.append(part) output2 = [] -- 2.39.2