summaryrefslogtreecommitdiff
path: root/test/it_html.t
diff options
context:
space:
mode:
Diffstat (limited to 'test/it_html.t')
-rwxr-xr-xtest/it_html.t18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/it_html.t b/test/it_html.t
index e6477da..80753db 100755
--- a/test/it_html.t
+++ b/test/it_html.t
@@ -253,6 +253,24 @@ is(
'empty tags removal'
);
+is(
+ it_html::sanitize('<a href = "http://search.ch/">foo</a>'),
+ '<a href="http://search.ch/">foo</a>',
+ 'it_html::sanitize handle anchors with spaces between attribute name and value'
+);
+
+is(
+ it_html::sanitize("<a href='http://search.ch/'>foo</a>"),
+ '<a href="http://search.ch/">foo</a>',
+ 'TODO it_html::sanitize handle anchors with single quotes at attribute value'
+);
+
+is(
+ it_html::sanitize("<a href=index.html>foo</a>"),
+ '<a href="index.html">foo</a>',
+ 'TODO it_html::sanitize handle anchors with unquoted attribute value'
+);
+
foreach (json_decode(it::file_get_contents(dirname($argv[0]) . '/U_tests.json'), true) as $test)
is(U(...$test['args']), $test['exp'], $test['name']);