Actions
Defect #44634
openCommonMark formatter test fails with commonmarker 2.10.1
Resolution:
Affected version:
Description
After updating the commonmarker gem from 2.10.0 to 2.10.1, the following test fails:
Failure:
Redmine::WikiFormatting::CommonMark::FormatterTest#test_should_escape_unwanted_tags [test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb:278]:
--- expected
+++ actual
@@ -1 +1 @@
-"<p>sit<br>amet <style>.foo { color: #fff; }</style> <script>alert(\"hello world\");</script></p>"
+"<p>sit<br>amet .foo { color: #fff; } </p>"
bin/rails test test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb:271
With commonmarker 2.10.0, the <style> and <script> tags in the input are escaped and shown as text. With 2.10.1, they are removed from the output instead.
Updated by Go MAEDA about 3 hours ago
- Target version set to 7.1.0
Pinned the commonmarker gem to 2.10.0 in r25267 as a temporary workaround for this issue.
Actions