Commit 30615564 authored by Nicolas Delaby's avatar Nicolas Delaby

Improve asSafeHTML converion test with new rules on meta tag.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36541 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 302fcc1a
......@@ -1506,6 +1506,8 @@ class TestDocument(TestDocumentMixin):
html_content = """<html>
<head>
<meta http-equiv="refresh" content="5;url=http://example.com/"/>
<meta http-equiv="Set-Cookie" content=""/>
<title>My dirty title</title>
<style type="text/css">
a {color: #FFAA44;}
......@@ -1533,6 +1535,8 @@ class TestDocument(TestDocumentMixin):
self.assertTrue('<head>' not in safe_html)
self.assertTrue('<style' not in safe_html)
self.assertTrue('#FFAA44' not in safe_html)
self.assertTrue('5;url=http://example.com/' not in safe_html)
self.assertTrue('Set-Cookie' not in safe_html)
# Check that outputed entire html is safe
entire_html = web_page.asEntireHTML()
......
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