Skip to content

Commit

Permalink
Merge pull request #35 from plone/plip1441
Browse files Browse the repository at this point in the history
Make tests pass with old and new safe HTML cleaner (PLIP 1441)
  • Loading branch information
jensens committed May 31, 2016
2 parents 99fa98d + 0fe1831 commit 6f0aa13
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Breaking changes:

New features:

- *add item here*
- Make tests work with old and new safe HTML cleaner (PLIP 1441)
[tomgross]

Bug fixes:

Expand Down
6 changes: 6 additions & 0 deletions Products/ATContentTypes/tests/test_atdocument.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ def test_x_safe_html(self):
text = "<p>test</p><script>I'm a nasty boy<p>nested</p></script>"
doc.setText(text, mimetype=mimetype)
txt = doc.getText()
# fix for lxml based safe HTML cleaner
# nested p-tags are not allowed and therefore removed
# put expected string to mimetypes tuple above and remove condition
# once PLIP 1441 is merged.
if '<p/>' in txt:
expected = '<p/><p>test</p>\n'
self.assertEqual(txt, expected, (txt, expected, mimetype))

def test_get_size(self):
Expand Down

0 comments on commit 6f0aa13

Please sign in to comment.