Luke Plant  committed 9749a3a

Fixed bug with HTML cleaning removing <br>'s with text beside them.

  • Participants
  • Parent commits a493d38

Comments (0)

Files changed (2)

File semanticeditor/

         self.assertEqualClean("This is<br /><br />a test",
                               "<p>This is</p><p>a test</p>")
+    def test_br_in_p(self):
+        self.assertEqualClean("<p>line 1<br />line 2<br />line 3</p>",
+                              "<p>line 1<br />line 2<br />line 3</p>")
     def test_p_in_li(self):
         self.assertEqualClean("<ul><li><p>An item</p></li></ul>",
                               "<ul><li>An item</li></ul>")

File semanticeditor/utils/

             if pq(n).is_(blockdef_selector):
-    for x in ['br + br', 'p + br', 'p:empty']:
+    for x in ['p + br', 'p:empty']:
     # Removed elements can give problems which need to be fixed again.  We keep