[Erp5-report] r33628 nicolas - /erp5/trunk/products/ERP5OOo/tests/testDms.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Mar 11 12:01:22 CET 2010


Author: nicolas
Date: Thu Mar 11 12:01:17 2010
New Revision: 33628

URL: http://svn.erp5.org?rev=33628&view=rev
Log:
Typo: replace html_content by safe_html in checks.
Add explanation about style nodes.

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=33628&r1=33627&r2=33628&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/tests/testDms.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/tests/testDms.py [utf8] Thu Mar 11 12:01:17 2010
@@ -1505,8 +1505,13 @@
     """
     web_page.edit(text_content=html_content)
     safe_html = web_page.asSafeHTML()
-    self.assertTrue('inside very broken HTML code' in html_content)
-    self.assertTrue('AZERTYY' not in html_content)
+    self.assertTrue('inside very broken HTML code' in safe_html)
+    # http://www.w3.org/TR/REC-html40/present/styles.html#edef-STYLE
+    # according to the HTML spec, style nodes contains only
+    # CDATA, so comments nodes are serialised as Text.
+    # The parser is not able to remove these pseudo comments nodes.
+    # Anyway style nodes should be stripped.
+    self.assertTrue('AZERTYY' not in safe_html)
 
 class TestDocumentWithSecurity(ERP5TypeTestCase):
 




More information about the Erp5-report mailing list