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

Unified Diff: cms/converters.py

Issue 5484402612109312: Issue 2460 - Support <span> tags inside translatable strings (Closed)
Patch Set: Created May 5, 2015, 9:28 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
@@ -105,17 +105,17 @@ class AttributeParser(HTMLParser.HTMLPar
def handle_entityref(self, name):
self._append_text(self.unescape("&%s;" % name))
def handle_charref(self, name):
self._append_text(self.unescape("&#%s;" % name))
class Converter:
- whitelist = set(["a", "em", "strong", "code"])
+ whitelist = {"a", "em", "strong", "code", "span"}
def __init__(self, params, key="pagedata"):
self._params = params
self._key = key
self._attribute_parser = AttributeParser(self.whitelist)
# Read in any parameters specified at the beginning of the file
lines = params[key].splitlines(True)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld