Inline image in Textile is not displayed if the image URL contains ampersands (#35441).

Contributed by Yuichi HARADA.


git-svn-id: http://svn.redmine.org/redmine/trunk@21101 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2021-07-28 08:25:15 +00:00
parent e32b37c7fb
commit f5ac84a516
2 changed files with 3 additions and 1 deletions

View File

@@ -150,6 +150,8 @@ class ApplicationHelperTest < Redmine::HelperTest
'with title !http://foo.bar/image.jpg(This is a double-quoted "title")!' =>
'with title <img src="http://foo.bar/image.jpg" title="This is a double-quoted &quot;title&quot;" ' \
'alt="This is a double-quoted &quot;title&quot;" />',
'with query string !http://foo.bar/image.cgi?a=1&b=2!' =>
'with query string <img src="http://foo.bar/image.cgi?a=1&#38;b=2" alt="" />'
}
to_test.each {|text, result| assert_equal "<p>#{result}</p>", textilizable(text)}
end