Add IDN and punycode domain test

This commit is contained in:
Mark Felder 2020-11-19 18:13:55 +00:00
parent 649fc9125d
commit c14ac019af

View file

@ -668,5 +668,19 @@ defmodule LinkifyTest do
assert Linkify.link(text) == expected
end
test "IDN and punycode domain" do
text = "FrauBücher.com says Neiiighhh!"
expected = "<a href=\"http://FrauBücher.com\">FrauBücher.com</a> says Neiiighhh!"
assert Linkify.link(text) == expected
text = "xn--fraubcher-u9a.com says Neiiighhh!"
expected = "<a href=\"http://xn--fraubcher-u9a.com\">xn--fraubcher-u9a.com</a> says Neiiighhh!"
assert Linkify.link(text) == expected
end
end
end