diff options
author | Christian Schneider | 2025-05-09 14:31:12 +0200 |
---|---|---|
committer | Christian Schneider | 2025-05-09 14:37:31 +0200 |
commit | f2225077d7450ea08f40ea45cc348184f1d30b97 (patch) | |
tree | 00af524abe9f1e70a3fb0a534f318b351107b710 /test/it_html.t | |
parent | 73b14dc5ea8c74fe17def89a31ab0eb5e53a4594 (diff) | |
download | itools-f2225077d7450ea08f40ea45cc348184f1d30b97.tar.gz itools-f2225077d7450ea08f40ea45cc348184f1d30b97.tar.bz2 itools-f2225077d7450ea08f40ea45cc348184f1d30b97.zip |
Handle mailto:-links and tags inside <a> tags in it_html::sanitize() (support request for https://search.ch/tel/biel-bienne/bahnhofstrasse-5/groupe-mutuel-4)HEADmaster
Diffstat (limited to 'test/it_html.t')
-rwxr-xr-x | test/it_html.t | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/it_html.t b/test/it_html.t index 15f444d..20ab65f 100755 --- a/test/it_html.t +++ b/test/it_html.t @@ -260,6 +260,18 @@ is( ); is( + it_html::sanitize('<a href="http://search.ch/"><strong>foo</strong></a>'), + '<a href="http://search.ch/"><strong>foo</strong></a>', + 'it_html::sanitize handle nesting of tags inside <a>' +); + +is( + it_html::sanitize('<a href="mailto:neuman@example.com">foo</a>'), + '<a href="mailto:neuman@example.com">foo</a>', + 'it_html::sanitize handle mailto links' +); + +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' |