| Index: cms/converters.py |
| =================================================================== |
| --- a/cms/converters.py |
| +++ b/cms/converters.py |
| @@ -176,17 +176,18 @@ |
| # Insert fixed strings |
| for i, fixed_string in enumerate(fixed_strings, 1): |
| result = result.replace('{{{}}}'.format(i), fixed_string) |
| # Insert attributes |
| result = escape(result) |
| - def stringify_attribute((name, value)): |
| + def stringify_attribute(attribute): |
|
Jon Sonesen
2018/03/01 00:00:15
alternatively, you can expand tuples when passed e
|
| + name, value = attribute |
| return '{}="{}"'.format( |
| escape(name), |
| escape(self.insert_localized_strings(value, {})) |
| ) |
| for tag in self.whitelist: |
| allowed_contents = '(?:[^<>]|{})'.format('|'.join( |
| '<(?:{}[^<>]*?|/{})>'.format(t, t) |