From fda5c71b5a3a2f0db439ea7c6a995eda38c8a629 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Sun, 9 Nov 2008 13:30:23 +0000 Subject: Added tests for sanitize with different encodings --- tests/it_html.t | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests') 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' => "", 'gnöp' => "fasel")))), '/foo.html?bar[gna]=42&bar[qux][quux]=%3CZ%FCrich%3E&bar[qux][gn%F6p]=fasel', -- cgit v1.2.3