rrrene / html_sanitize_ex

HTML sanitizer for Elixir
MIT License
271 stars 62 forks source link

Update 'mochiweb' to 2.15 #22

Closed marvelm closed 7 years ago

marvelm commented 7 years ago

I need to make this change because we'd like to use html_sanitize_ex and floki in the same project, but there's a version conflict. floki requires mochiweb to be at least 2.15.0.

ArturT commented 7 years ago

Would be great to merge this but there is an error with one test:

  1) test should not destroy white-space /2 (HtmlSanitizeExScrubberStripTagsTest)
     test/strip_tags_test.exs:248
     Assertion with == failed
     code: "sometext with break between tags\r\nwill remove break" == strip_tags("some<b>text with break between tags</b>\r\n<i>will remove break</i>")
     lhs:  "sometext with break between tags\r\nwill remove break"
     rhs:  "sometext with break between tagswill remove break"
     stacktrace:
       test/strip_tags_test.exs:249
marvelm commented 7 years ago

Looks like it's caused by the fact mochiweb ignores some whitespace characters. A contributor has also previously encountered this issue.

rrrene commented 7 years ago

v1.2.0 contains this. :+1: