\n",
"blank unprintable characters and illegal utf8 in attributes but not in normal text"
);
is(
div(["arg\x03\x0e\x0f\xc2\x80\xc2\x9fendarg" => "value", "content"]),
"
swisspics posted < < ä & yesterday a phototag missmatch:
'),
'
swisspics posted < < ä & yesterday a phototag missmatch:
',
'it_html::sanitize tag soup'
);
is(
it_html::sanitize('q←x'),
"q←x",
'it_html::sanitize preserve numeric entities'
);
is(
it_html::sanitize('qüx'),
"q\xc3\xbcx",
'it_html::sanitize with utf-8'
);
is(
it_html::sanitize('a b'),
"a b",
'it_html::sanitize with b and br (tag prefix of other tag bug)'
);
is(
it_html::sanitize(''),
'',
'empty tags removal'
);
is(
it_html::sanitize('foo'),
'foo',
'it_html::sanitize handle anchors with spaces between attribute name and value'
);
is(
it_html::sanitize("foo"),
'foo',
'TODO it_html::sanitize handle anchors with single quotes at attribute value'
);
is(
it_html::sanitize("foo"),
'foo',
'TODO it_html::sanitize handle anchors with unquoted attribute value'
);
is(
it_html::sanitize(''),
'',
'it_html::sanitize handle anchors with spaces between attribute name and value in img'
);
is(
it_html::sanitize(""),
'',
'TODO it_html::sanitize handle anchors with single quotes at attribute value in img'
);
is(
it_html::sanitize(""),
'',
'TODO it_html::sanitize handle anchors with unquoted attribute value in img'
);
foreach (json_decode(it::file_get_contents(dirname($argv[0]) . '/U_tests.json'), true) as $test)
is(U(...$test['args']), $test['exp'], $test['name']);
is(it_html::entity_decode("ä"), "ä");
is(it_html::entity_decode("J"), "J");
is(it_html::entity_decode("J"), "J");
is(it_html::entity_decode("A"), "A");
# tests for itools extension
is(table(null), "