From 6d6b6c57f8496597f7495e3e3a5b6a616518e368 Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Thu, 21 Oct 2010 13:53:23 +0200 Subject: Improvements of the regular expression for tag clouds and search. --- pyAggr3g470r.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pyAggr3g470r.py') diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index f1cd70c6..3b7b9501 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -310,7 +310,7 @@ class Root: in the description of the article. """ param, _, value = querystring.partition(':') - wordre = re.compile(r'\b%s\b' % param.lower()) + wordre = re.compile(r'\b%s\b' % param, re.I) feed_id = None if param == "Feed": feed_id, _, querystring = value.partition(':') @@ -325,7 +325,7 @@ class Root: article_content = utils.clear_string(article[4].encode('utf-8')) if not article_content: utils.clear_string(article[2].encode('utf-8')) - if wordre.findall(article_content.lower()) != []: + if wordre.findall(article_content) != []: if article[5] == "0": # not readed articles are in bold not_read_begin = "" @@ -346,7 +346,7 @@ class Root: article_content = utils.clear_string(article[4].encode('utf-8')) if not article_content: utils.clear_string(article[2].encode('utf-8')) - if wordre.findall(article_content.lower()) != []: + if wordre.findall(article_content) != []: if new_feed_section is True: new_feed_section = False html += """