From 7d29ba2fc77d1e2b902b3742de6671a87b4d31e2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 19 Aug 2010 14:04:55 -0400 Subject: add htmlscrubber colon in url cases to test suite --- t/htmlize.t | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) 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{bar}), q{bar}, "class attribute allowed"); +is(IkiWiki::htmlize("foo", "foo", "mdwn", + q{}), + q{}, "simple anchor allowed"); +is(IkiWiki::htmlize("foo", "foo", "mdwn", + q{}), + q{}, "colon allowed in anchor"); +is(IkiWiki::htmlize("foo", "foo", "mdwn", + q{}), + q{}, "colon allowed in query string"); +is(IkiWiki::htmlize("foo", "foo", "mdwn", + q{}), + q{}, "unknown protocol blocked"); +is(IkiWiki::htmlize("foo", "foo", "mdwn", + q{}), + q{}, "simple relative anchor allowed"); +is(IkiWiki::htmlize("foo", "foo", "mdwn", + q{}), + q{}, "colon in simple relative anchor allowed"); -- cgit v1.2.3