summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2022-10-04 19:01:16 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2022-10-04 19:01:16 +0000
commit295a6493260991fb0bf43a39211297cb103cc01b (patch)
tree3856574e0b35f138701e017502298f96abf3ac9a /test
parent2d69632250d978e18b86951a611ae81344950289 (diff)
downloadredmine-295a6493260991fb0bf43a39211297cb103cc01b.tar.gz
redmine-295a6493260991fb0bf43a39211297cb103cc01b.zip
Merge r21894 from trunk to 5.0-stable (#37751).
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@21895 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-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 30013b837..23f6d7538 100644
--- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
@@ -751,6 +751,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)