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

Unified Diff: cms/converters.py

Issue 29670651: Issue 5844 - Remove redundant parentheses in cms (Closed) Base URL: https://hg.adblockplus.org/cms/
Patch Set: Created Jan. 16, 2018, 6:10 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
« cms/bin/generate_static_pages.py ('K') | « cms/bin/generate_static_pages.py ('k') | 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
@@ -188,10 +188,10 @@
)
for tag in self.whitelist:
- allowed_contents = '(?:[^<>]|{})'.format('|'.join((
+ allowed_contents = '(?:[^<>]|{})'.format('|'.join(
'<(?:{}[^<>]*?|/{})>'.format(t, t)
for t in map(re.escape, self.whitelist - {tag})
- )))
+ ))
saved = saved_attributes.get(tag, [])
for attrs in saved:
attrs = map(stringify_attribute, attrs)
« cms/bin/generate_static_pages.py ('K') | « cms/bin/generate_static_pages.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld