mirror of
https://github.com/redmine/redmine.git
synced 2025-11-10 15:26:03 +01:00
Fix duplicated alt and title attributes for attached images in Textile formatter (#40650).
Patch by Katsuya HIDAKA (@hidakatsuya). git-svn-id: https://svn.redmine.org/redmine/trunk@22845 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -202,11 +202,11 @@ class ApplicationHelperTest < Redmine::HelperTest
|
||||
attachments = Attachment.all
|
||||
with_settings text_formatting: 'textile' do
|
||||
# When alt text is set
|
||||
assert_match %r[<img src=".+?" title="This is a logo" alt="This is a logo" loading=".+?" title="alt text" alt="alt text" />],
|
||||
assert_match %r[<img src=".+?" title="alt text" alt="alt text" loading=".+?" />],
|
||||
textilizable('!logo.gif(alt text)!', attachments: attachments)
|
||||
|
||||
# When alt text and style are set
|
||||
assert_match %r[<img src=".+?" title="This is a logo" alt="This is a logo" loading=".+?" style="width:100px;" title="alt text" alt="alt text" />],
|
||||
assert_match %r[<img src=".+?" title="alt text" alt="alt text" loading=".+?" style="width:100px;" />],
|
||||
textilizable('!{width:100px}logo.gif(alt text)!', attachments: attachments)
|
||||
|
||||
# When alt text is not set
|
||||
|
||||
Reference in New Issue
Block a user