Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 18 additions and 0 deletions.
  1. +18 −0 test/autolink_test.rb
View
18 test/autolink_test.rb
@@ -149,6 +149,24 @@ def test_block
assert_equal link, "Find ur favorite pokeman @ <a href=\"http://www.pokemon.com\">POKEMAN WEBSITE</a>"
end
+ def test_block_encoding
+ url = "http://example.com/х"
+ assert_equal "UTF-8", url.encoding.to_s
+
+ link = Rinku.auto_link(url) do |url|
+ assert_equal "UTF-8", url.encoding.to_s
+ url
+ end
+
+ assert_equal link.encoding.to_s, "UTF-8"
+ end
+
+ def test_links_with_cyrillic_x
+ url = "http://example.com/х"
+
+ assert_linked "<a href=\"#{url}\">#{url}</a>", url
+ end
+
def test_autolink_works
url = "http://example.com/"
assert_linked "<a href=\"#{url}\">#{url}</a>", url

No commit comments for this range

Something went wrong with that request. Please try again.