fix formatting of tag values with semicolon-separated URLs

This commit is contained in:
Kyle Hensel 2022-12-31 16:37:29 +13:00
parent 18b642bfa9
commit 305acfe516
No known key found for this signature in database
GPG key ID: A6481E3E38D544EC
2 changed files with 7 additions and 1 deletions

View file

@ -49,6 +49,12 @@ class BrowseTagsHelperTest < ActionView::TestCase
html = format_value("contact", "foo@example.com")
assert_dom_equal "<a title=\"Email foo@example.com\" href=\"mailto:foo@example.com\">foo@example.com</a>", html
html = format_value("source", "https://example.com")
assert_dom_equal "<a href=\"https://example.com\" rel=\"nofollow\">https://example.com</a>", html
html = format_value("source", "https://example.com;hello;https://example.net")
assert_dom_equal "<a href=\"https://example.com\" rel=\"nofollow\">https://example.com</a>;hello;<a href=\"https://example.net\" rel=\"nofollow\">https://example.net</a>", html
end
def test_wiki_link