Index: cms/converters.py |
=================================================================== |
--- a/cms/converters.py |
+++ b/cms/converters.py |
@@ -130,20 +130,17 @@ |
self._params = params |
self._attribute_parser = AttributeParser(self.whitelist) |
self._seen_defaults = {} |
def localize_string( |
self, page, name, default, comment, localedata, escapes): |
def escape(s): |
- return re.sub(r'.', |
- lambda match: escapes.get(match.group(0), |
- match.group(0)), |
- s, flags=re.S) |
+ return ''.join(escapes.get(c, c) for c in s) |
def re_escape(s): |
return re.escape(escape(s)) |
# Handle duplicated strings |
if default: |
self._seen_defaults[(page, name)] = (default, comment) |
else: |