diff options
author | intrigeri <intrigeri@boum.org> | 2010-08-22 11:09:37 +0200 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2010-08-22 11:09:37 +0200 |
commit | e85c15e75bc7a24be537d905a53877f462c2d8cd (patch) | |
tree | fa85db6a62ca89c6d6262d6814cf851dc8187561 /t | |
parent | 474b6524e0fe4b4bb3402bf6551bf97be7f3ee1f (diff) | |
parent | 87acb9ad1c009c3a6570fad09b5286b5399d86bc (diff) | |
download | ikiwiki-e85c15e75bc7a24be537d905a53877f462c2d8cd.tar ikiwiki-e85c15e75bc7a24be537d905a53877f462c2d8cd.tar.gz |
Merge remote branch 'upstream/master' into prv/po
Diffstat (limited to 't')
-rwxr-xr-x | t/htmlize.t | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/t/htmlize.t b/t/htmlize.t index a7e7f8c39..a436748f9 100755 --- a/t/htmlize.t +++ b/t/htmlize.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 26; +use Test::More tests => 32; use Encode; BEGIN { use_ok("IkiWiki"); } @@ -68,3 +68,21 @@ is(IkiWiki::htmlize("foo", "foo", "mdwn", is(IkiWiki::htmlize("foo", "foo", "mdwn", q{<span class="foo">bar</span>}), q{<span class="foo">bar</span>}, "class attribute allowed"); +is(IkiWiki::htmlize("foo", "foo", "mdwn", + q{<a href="aaa#foo">}), + q{<a href="aaa#foo">}, "simple anchor allowed"); +is(IkiWiki::htmlize("foo", "foo", "mdwn", + q{<a href="aaa#foo:bar">}), + q{<a href="aaa#foo:bar">}, "colon allowed in anchor"); +is(IkiWiki::htmlize("foo", "foo", "mdwn", + q{<a href="aaa?foo:bar">}), + q{<a href="aaa?foo:bar">}, "colon allowed in query string"); +is(IkiWiki::htmlize("foo", "foo", "mdwn", + q{<a href="foo:bar">}), + q{<a>}, "unknown protocol blocked"); +is(IkiWiki::htmlize("foo", "foo", "mdwn", + q{<a href="#foo">}), + q{<a href="#foo">}, "simple relative anchor allowed"); +is(IkiWiki::htmlize("foo", "foo", "mdwn", + q{<a href="#foo:bar">}), + q{<a href="#foo:bar">}, "colon in simple relative anchor allowed"); |