Project

General

Profile

Actions

Defect #44634

open

CommonMark no longer escapes the tags covered by the tagfilter extension removed in commonmarker 2.10.1

Added by Go MAEDA about 4 hours ago. Updated 8 minutes ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Gems support
Target version:
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 &lt;style&gt;.foo { color: #fff; }&lt;/style&gt; &lt;script&gt;alert(\"hello world\");&lt;/script&gt;</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.


Files

Actions

Also available in: Atom PDF