Skip to content

Commit

Permalink
Adds a unicode flag to handle unicode properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
BertrandBordage committed Jul 1, 2013
1 parent 9d33810 commit 1b01982
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion terms/managers.py
Expand Up @@ -47,6 +47,6 @@ def replace_regexp(self):
terms = sorted(self.replace_dict().keys(), key=len, reverse=True)
r = re.compile('(?P<before>^|\W)(?P<name>%s)(?P<after>\W|$)'
% '|'.join(map(re.escape, terms)),
flags=re.IGNORECASE)
flags=re.IGNORECASE | re.UNICODE)
cache.set(REPLACE_REGEXP_CACHE_KEY, r)
return r

0 comments on commit 1b01982

Please sign in to comment.