Image filename for HDPI monitors (image@2x.jpg) are misrecognized as email address (#27968).

Patch by Marius BALTEANU.

git-svn-id: http://svn.redmine.org/redmine/trunk@17394 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2018-06-17 06:00:21 +00:00
parent b1b89ff0ac
commit f748296121
3 changed files with 18 additions and 2 deletions

View File

@@ -77,6 +77,18 @@ EXPECTED
end
end
def test_hires_images_should_not_be_recognized_as_email_addresses
raw = <<-DIFF
Image: logo@2x.png
DIFF
expected = <<-EXPECTED
<p>Image: logo@2x.png</p>
EXPECTED
assert_equal expected.gsub(%r{[\r\n\t]}, ''), Redmine::WikiFormatting::NullFormatter::Formatter.new(raw).to_html.gsub(%r{[\r\n\t]}, '')
end
def test_cache_key_for_saved_object_should_no_be_nil
assert_not_nil Redmine::WikiFormatting.cache_key_for('textile', 'Text', Issue.find(1), :description)
end