Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: cms/converters.py

Issue 6596081882234880: Issue 2457 - Don`t escape translatable attributes twice (Closed)
Patch Set: Created May 5, 2015, 2:39 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cms/converters.py
===================================================================
--- a/cms/converters.py
+++ b/cms/converters.py
@@ -145,17 +145,17 @@ class Converter:
for i in range(len(fixed_strings)):
result = re.sub(r"\{%d\}" % (i + 1), fixed_strings[i], result, 1)
# Insert attributes
result = escape(result)
def stringify_attribute((name, value)):
return '%s="%s"' % (
escape(name),
- escape(self.insert_localized_strings(value, escapes))
+ escape(self.insert_localized_strings(value, {}))
)
for tag in self.whitelist:
saved = saved_attributes.get(tag, [])
for attrs in saved:
attrs = map(stringify_attribute, attrs)
result = re.sub(
r"%s([^<>]*?)%s" % (re_escape("<%s>" % tag), re_escape("</%s>" % tag)),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld