summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2022-10-04 19:01:37 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2022-10-04 19:01:37 +0000
commitc73bc29866197ad5c7c271d5e00d19f093dd7c77 (patch)
treeb2a6850f5f3de3d00f1e1b0912372e2eac5369bb /test/unit
parent3caa932bad1eba32d4c8a0f45cc29478d3f9b4a4 (diff)
downloadredmine-c73bc29866197ad5c7c271d5e00d19f093dd7c77.tar.gz
redmine-c73bc29866197ad5c7c271d5e00d19f093dd7c77.zip
Merge r21894 from trunk to 4.2-stable (#37751).
git-svn-id: https://svn.redmine.org/redmine/branches/4.2-stable@21896 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb7
1 files changed, 7 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 5ee4defe1..28a3d92ab 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,13 @@ 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_bq_citations
+ assert_html_output({
+ %{bq.:http://x/"onmouseover="alert(document.domain) Hover me} =>
+ %{<blockquote cite="http://x/&quot;onmouseover=&quot;alert(document.domain)">\n\t\t<p>Hover me</p>\n\t</blockquote>}
+ }, false)
+ end
+
private
def assert_html_output(to_test, expect_paragraph = true)