Commit 8515e0ac authored by Arnaud Fontaine's avatar Arnaud Fontaine

PortalTransforms: safe_html: Changes in b255c894 were not actually applied so...

PortalTransforms: safe_html: Changes in b255c894 were not actually applied so merge FS module and portal_transforms/safe_html.
parent 3c171644
Pipeline #6686 failed with stage
...@@ -1775,8 +1775,8 @@ class TestDocument(TestDocumentMixin): ...@@ -1775,8 +1775,8 @@ class TestDocument(TestDocumentMixin):
self.assertTrue('<title>' in entire_html) self.assertTrue('<title>' in entire_html)
self.assertTrue('<body>' in entire_html) self.assertTrue('<body>' in entire_html)
self.assertTrue('<head>' in entire_html) self.assertTrue('<head>' in entire_html)
self.assertTrue('<style' in entire_html) self.assertTrue('<style' not in entire_html)
self.assertTrue('#FFAA44' in entire_html) self.assertTrue('#FFAA44' not in entire_html)
self.assertTrue('charset=utf-8' in entire_html) self.assertTrue('charset=utf-8' in entire_html)
self.assertTrue('javascript' not in entire_html) self.assertTrue('javascript' not in entire_html)
self.assertTrue('alert("da");' not in entire_html) self.assertTrue('alert("da");' not in entire_html)
......
...@@ -37,6 +37,7 @@ VALID_TAGS = { ...@@ -37,6 +37,7 @@ VALID_TAGS = {
'dl': 1, 'dl': 1,
'dt': 1, 'dt': 1,
'em': 1, 'em': 1,
'font': 1,
'h1': 1, 'h1': 1,
'h2': 1, 'h2': 1,
'h3': 1, 'h3': 1,
...@@ -120,9 +121,13 @@ VALID_TAGS['rt'] = 1 ...@@ -120,9 +121,13 @@ VALID_TAGS['rt'] = 1
VALID_TAGS['ruby'] = 1 VALID_TAGS['ruby'] = 1
VALID_TAGS['section'] = 1 VALID_TAGS['section'] = 1
VALID_TAGS['source'] = 1 VALID_TAGS['source'] = 1
VALID_TAGS['summary'] = 1
VALID_TAGS['time'] = 1 VALID_TAGS['time'] = 1
VALID_TAGS['video'] = 1 VALID_TAGS['video'] = 1
# Selenium tests
VALID_TAGS['test'] = 1
# add some tags to nasty. # add some tags to nasty.
NASTY_TAGS['style'] = 1 # this helps improve Word HTML cleanup. NASTY_TAGS['style'] = 1 # this helps improve Word HTML cleanup.
NASTY_TAGS['meta'] = 1 # allowed by parsers, but can cause unexpected behavior NASTY_TAGS['meta'] = 1 # allowed by parsers, but can cause unexpected behavior
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment