[Erp5-report] r36541 nicolas - /erp5/trunk/products/ERP5OOo/tests/testDms.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Jun 23 15:50:23 CEST 2010
Author: nicolas
Date: Wed Jun 23 15:50:22 2010
New Revision: 36541
URL: http://svn.erp5.org?rev=36541&view=rev
Log:
Improve asSafeHTML converion test with new rules on meta tag.
Modified:
erp5/trunk/products/ERP5OOo/tests/testDms.py
Modified: erp5/trunk/products/ERP5OOo/tests/testDms.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/tests/testDms.py?rev=36541&r1=36540&r2=36541&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/tests/testDms.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/tests/testDms.py [utf8] Wed Jun 23 15:50:22 2010
@@ -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()
More information about the Erp5-report
mailing list