From 89d02c90e8fe422cad65b7ff03960f58e5b4a8f1 Mon Sep 17 00:00:00 2001 From: Christian A. Weber Date: Tue, 17 Apr 2018 12:55:22 +0200 Subject: first amendment of last commit --- it_html.class | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'it_html.class') diff --git a/it_html.class b/it_html.class index 03a46ea..abd674f 100644 --- a/it_html.class +++ b/it_html.class @@ -77,7 +77,6 @@ function __construct($p = array()) 'moretags' => '', # Comma-separated list of tag-functions to generate additionally to 'tags' 'name' => 'it_html', # Name of global variable $this is assigned to (string), XXX Copy and paste in configure() to keep PHP4 compatibility 'nonewlinetags' => 'a,b,em,img,input,label,span,noscript', # tags that do not like newlines after them - 'alwaysclosetags' => 'a,button,div,iframe,pre,script,span,tbody,td,tfoot,thead,textarea,ul,ol', # tags which always get a close tag 'prettyprint' => it::is_devel(), # Should output be prettily indented? 'show_boot_dom' => false, # If true, append invisible
at the end of body 'show_content_type' => true, # If true, add header @@ -141,7 +140,6 @@ static function configure($p) $ithtml->p = $p + (array)$ithtml->p; $ithtml->alltags = array_flip(explode(',', trim($ithtml->p['tags'] . ',' . $ithtml->p['moretags'], ','))); $ithtml->hasnonewline = array_flip(explode(',', $ithtml->p['nonewlinetags'])); - $ithtml->alwaysclose = array_flip(explode(',', $ithtml->p['alwaysclosetags'])); } /** @@ -319,7 +317,7 @@ function _tag($name, $args) # close tag according to html dialect if ($this->p['htmltype'][0] == 'x') # xhtml - $result .= isset($data) || isset($this->alwaysclose[$name]) ? ">$data$newline" : " />$newline"; + $result .= isset($data) ? ">$data$newline" : " />$newline"; else $result .= isset($data) || !self::$voidtags[$name] ? ">$data$newline" : ">$newline"; -- cgit v1.2.3