Defect #35441 » 35441-v2.patch
| lib/redmine/wiki_formatting/textile/redcloth3.rb | ||
|---|---|---|
|
href, alt_title = check_refs( href ) if href
|
||
|
url, url_title = check_refs( url )
|
||
|
next m unless uri_with_safe_scheme?(url)
|
||
|
next m unless uri_with_safe_scheme?(url.partition('?').first)
|
||
|
if href
|
||
|
href = htmlesc(href.dup)
|
||
|
next m if href.downcase.start_with?('javascript:')
|
||
| test/helpers/application_helper_test.rb | ||
|---|---|---|
|
'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 "title"" ' \
|
||
|
'alt="This is a double-quoted "title"" />',
|
||
|
'with query string !http://foo.bar/image.cgi?a=1&b=2!' =>
|
||
|
'with query string <img src="http://foo.bar/image.cgi?a=1&b=2" alt="" />'
|
||
|
}
|
||
|
to_test.each {|text, result| assert_equal "<p>#{result}</p>", textilizable(text)}
|
||
|
end
|
||
- « Previous
- 1
- 2
- 3
- Next »