diff options
author | Christian Schneider | 2008-11-09 13:30:23 +0000 |
---|---|---|
committer | Christian Schneider | 2008-11-09 13:30:23 +0000 |
commit | fda5c71b5a3a2f0db439ea7c6a995eda38c8a629 (patch) | |
tree | 5243837a36498fed92d9782fbfa89e28fd1859c0 /tests/it_html.t | |
parent | 9c79c7183997909600ab38936100f1b7e3d30ac4 (diff) | |
download | itools-fda5c71b5a3a2f0db439ea7c6a995eda38c8a629.tar.gz itools-fda5c71b5a3a2f0db439ea7c6a995eda38c8a629.tar.bz2 itools-fda5c71b5a3a2f0db439ea7c6a995eda38c8a629.zip |
Added tests for sanitize with different encodings
Diffstat (limited to 'tests/it_html.t')
-rwxr-xr-x | tests/it_html.t | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/it_html.t b/tests/it_html.t index 7426a0d..31eda14 100755 --- a/tests/it_html.t +++ b/tests/it_html.t @@ -101,6 +101,20 @@ is( 'it_html::sanitize tag soup' ); +it_html::configure('charset' => "utf-8"); +is( + it_html::sanitize('qüx'), + "q\xc3\xbcx", + 'it_html::sanitize with utf-8', +); + +it_html::configure('charset' => "iso-8859-1"); +is( + it_html::sanitize('qüx'), + "q\xfcx", + 'it_html::sanitize with latin1', +); + is( U("/foo.html", array('bar' => array('gna' => 42, 'qux' => array('quux' => "<Zürich>", 'gnöp' => "fasel")))), '/foo.html?bar[gna]=42&bar[qux][quux]=%3CZ%FCrich%3E&bar[qux][gn%F6p]=fasel', |