X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/9f62caaff7676ee87d7ab348064a8f8a93f488ac..883880b46ddc0d650f70bd6ca2a22539ff78f1b6:/t/textile-double-escape-bug.t?ds=sidebyside

diff --git a/t/textile-double-escape-bug.t b/t/textile-double-escape-bug.t
index fe73f331b..f8ab3f7e1 100755
--- a/t/textile-double-escape-bug.t
+++ b/t/textile-double-escape-bug.t
@@ -14,17 +14,22 @@ BEGIN {
 
 subtest 'Text::Textile apparently double-escapes HTML entities in hrefs' => sub {
 	my $text = q{Gödel, Escher, Bach};
+	my $text_ok = qr{G(?:ö|ö|ö|&#x[fF]6;)del, Escher, Bach};
 	my $href = q{https://en.wikipedia.org/wiki/Gödel,_Escher,_Bach};
-	my $good = qq{<p><a href="$href">$text</a></p>};
+	my $href_ok = qr{https://en\.wikipedia\.org/wiki/G(?:ö|&ouml;|&#246;|&#x[fF]6|%[cC]3%[bB]6)del,_Escher,_Bach};
+	my $good = qr{<p><a href="$href_ok">$text_ok</a></p>};
 
 	chomp(my $mdwn_html = IkiWiki::Plugin::mdwn::htmlize(
 		content => qq{[$text]($href)},
 	));
-	is($mdwn_html, $good);
+	like($mdwn_html, $good);
 
 	chomp(my $txtl_html = IkiWiki::Plugin::textile::htmlize(
 		content => qq{"$text":$href},
 	));
-	isnt($txtl_html, $good);
-	is($txtl_html, q{<p><a href="https://en.wikipedia.org/wiki/G&amp;ouml;del,_Escher,_Bach">G&ouml;del, Escher, Bach</a></p>});
+	TODO: {
+	local $TODO = "Text::Textile double-escapes the href";
+	like($txtl_html, $good);
+	unlike($txtl_html, qr{<p><a href="https://en\.wikipedia\.org/wiki/G&amp;ouml;del,_Escher,_Bach">G&ouml;del, Escher, Bach</a></p>}i);
+	}
 };