summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/it_html.t12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/it_html.t b/tests/it_html.t
index 2d99cf3..2838ae1 100755
--- a/tests/it_html.t
+++ b/tests/it_html.t
@@ -86,6 +86,12 @@ is(
# Inheriting and extending it_html
class myhtml extends it_html
{
+
+function myhtml($p = array())
+{
+ parent::it_html($p + array('nonewlinetags' => 'a,b,em,img,input,span,div'));
+}
+
function myimg($args)
{
array_unshift($args, array('alt' => "ALT", 'bar' => "BAR"));
@@ -104,6 +110,12 @@ is(
);
is(
+ div(array('attr' => 'value'), 'content'),
+ '<div attr="value">content</div>',
+ "different nonewlinetags respected"
+);
+
+is(
it_html::sanitize(" \r \n " . ' <p><a href="http://www.flickr.com/people/swisspics%/">swisspics</a> posted < &lt; &auml; &amp; yesterday <b>a <i>photo</i></b> <b><i>tag missmatch</b></i>:</p><br><BR />
<P><a href="javascript:window.close()" title="Wolken"><img src="http://farm1.static.flickr.com/177/377214376_bcba167a7d_m.jpg" width="240" height="180" alt="Wolken" style="border: 1px solid #ddd;" /></a></p>