summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2022-10-17 13:59:56 +0000
committerGo MAEDA <maeda@farend.jp>2022-10-17 13:59:56 +0000
commit919bbdc9ce43d52c74672bd972a49880c4c7a559 (patch)
tree7ea84d106d5835749e798809739b3ccb8bc089fa /test
parentc73bc29866197ad5c7c271d5e00d19f093dd7c77 (diff)
downloadredmine-919bbdc9ce43d52c74672bd972a49880c4c7a559.tar.gz
redmine-919bbdc9ce43d52c74672bd972a49880c4c7a559.zip
Merged r21902 from trunk to 4.2-stable (#37767).
git-svn-id: https://svn.redmine.org/redmine/branches/4.2-stable@21904 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
index 28a3d92ab..2cf06680e 100644
--- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
@@ -703,6 +703,17 @@ class Redmine::WikiFormatting::TextileFormatterTest < ActionView::TestCase
assert_equal expected.gsub(%r{[\r\n\t]}, ''), to_html(text).gsub(%r{[\r\n\t]}, '')
end
+ def test_should_escape_tags_that_start_with_pre
+ text = <<~STR
+ <preä demo>Text
+ STR
+
+ expected = <<~EXPECTED
+ <p>&lt;preä demo&gt;Text</p>
+ EXPECTED
+ assert_equal expected.gsub(%r{[\r\n\t]}, ''), to_html(text).gsub(%r{[\r\n\t]}, '')
+ end
+
def test_should_escape_bq_citations
assert_html_output({
%{bq.:http://x/"onmouseover="alert(document.domain) Hover me} =>