elsif colour_value = colour_preview(key, value)
tag.span("", :class => "colour-preview-box", :"data-colour" => colour_value, :title => t("browse.tag_details.colour_preview", :colour_value => colour_value)) + colour_value
else
- safe_join(h(value).split(";").map { |x| linkify(x) }, ";")
+ safe_join(value.split(";").map { |x| linkify(h(x)) }, ";")
end
end
html = format_value("unknown", "unknown")
assert_dom_equal "unknown", html
+ html = format_value("addr:street", "Rue de l'Amigo")
+ assert_dom_equal "Rue de l'Amigo", html
+
html = format_value("phone", "+1234567890")
assert_dom_equal "<a href=\"tel:+1234567890\" title=\"Call +1234567890\">+1234567890</a>", html