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

@@ -699,13 +699,13 @@ RAW
with_settings :text_formatting => 'textile' do
raw = "attachment:image@2x.png should not be parsed in image@2x.png"
assert_match %r{<p><a class="attachment" href="/attachments/#{attachment.id}/image@2x.png">image@2x.png</a> should not be parsed in <a class="email" href="mailto:image@2x.png">image@2x.png</a></p>},
assert_match %r{<p><a class="attachment" href="/attachments/#{attachment.id}/image@2x.png">image@2x.png</a> should not be parsed in image@2x.png</p>},
textilizable(raw, :attachments => [attachment])
end
with_settings :text_formatting => 'markdown' do
raw = "attachment:image@2x.png should not be parsed in image@2x.png"
assert_match %r{<p><a class="attachment" href="/attachments/#{attachment.id}/image@2x.png">image@2x.png</a> should not be parsed in <a href="mailto:image@2x.png">image@2x.png</a></p>} ,
assert_match %r{<p><a class="attachment" href="/attachments/#{attachment.id}/image@2x.png">image@2x.png</a> should not be parsed in image@2x.png</p>} ,
textilizable(raw, :attachments => [attachment])
end
end