1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-03-10 19:23:06 +00:00

Merged r21865 from trunk to 5.0-stable (#37713).

git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@21866 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2022-09-28 09:02:46 +00:00
parent 0baa15fd15
commit 59852ed845

View File

@ -52,8 +52,14 @@ if Object.const_defined?(:CommonMarker)
end
def test_external_links_with_target_get_rel_noopener
assert_equal %(<a target="_blank" href="http://example.net/" class="external" rel="noopener">link</a>), filter(%(<a target="_blank" href="http://example.net/">link</a>))
assert_equal %(<a target="_blank" href="http://example.net/" rel="nofollow noopener" class="external">link</a>), filter(%(<a target="_blank" href="http://example.net/" rel="nofollow">link</a>))
assert_equal(
%(<a target="_blank" href="http://example.net/" class="external" rel="noopener">link</a>),
filter(%(<a target="_blank" href="http://example.net/">link</a>))
)
assert_equal(
%(<a target="_blank" href="http://example.net/" rel="nofollow noopener" class="external">link</a>),
filter(%(<a target="_blank" href="http://example.net/" rel="nofollow">link</a>))
)
end
end
end