[FIX] tools: sanitizer: decode pipe character
Mako uses pipe character in several occasions like |safe to tell an email is safe. However the sanitizer will encode it, leading to template not correctly rendered. Like other special characters used in mako, it is now decoded after sanitize.
This commit is contained in:
@@ -220,6 +220,7 @@ def html_sanitize(src, silent=True, sanitize_tags=True, sanitize_attributes=Fals
|
||||
cleaned = cleaned.replace('%20', ' ')
|
||||
cleaned = cleaned.replace('%5B', '[')
|
||||
cleaned = cleaned.replace('%5D', ']')
|
||||
cleaned = cleaned.replace('%7C', '|')
|
||||
cleaned = cleaned.replace('<%', '<%')
|
||||
cleaned = cleaned.replace('%>', '%>')
|
||||
except etree.ParserError, e:
|
||||
|
||||
Reference in New Issue
Block a user