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

Unified Diff: cms/converters.py

Issue 4750268684042240: Issue 2428 - Allow <code> in translated strings (Closed)
Patch Set: Created April 28, 2015, 9:57 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
@@ -101,17 +101,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"])
+ whitelist = set(["a", "em", "strong", "code"])
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