diff options
| author | Christian A. Weber | 2018-04-17 12:47:09 +0200 | 
|---|---|---|
| committer | Christian A. Weber | 2018-04-17 12:53:44 +0200 | 
| commit | c7fecb80537e499fd135736d3eaf121241a973cd (patch) | |
| tree | 3aa1a08d37e98e7a5576f5cc7657feb0cba4a931 /it_html.class | |
| parent | 0254eecab7934f9b07d084465dd9b15c9927b40e (diff) | |
| download | itools-c7fecb80537e499fd135736d3eaf121241a973cd.tar.gz itools-c7fecb80537e499fd135736d3eaf121241a973cd.tar.bz2 itools-c7fecb80537e499fd135736d3eaf121241a973cd.zip  | |
fix empty non-void tags in non-xhtml modes, remove redundant whitelist
Diffstat (limited to 'it_html.class')
| -rw-r--r-- | it_html.class | 10 | 
1 files changed, 4 insertions, 6 deletions
diff --git a/it_html.class b/it_html.class index 7437aed..03a46ea 100644 --- a/it_html.class +++ b/it_html.class @@ -317,13 +317,11 @@ function _tag($name, $args)  			$result .= ($this->p['htmltype'][0] != 'x') ? " $key" : " $key=\"$key\"";  	} -	# Apply a kind of magic... this needs further investigation -	if (isset($data) || isset($this->alwaysclose[$name])) -		$result .= ">$data</$name>$newline"; -	elseif ($this->p['htmltype'][0] != 'x') -		$result .= ">$newline"; +	# close tag according to html dialect +	if ($this->p['htmltype'][0] == 'x')	# xhtml +		$result .= isset($data) || isset($this->alwaysclose[$name]) ? ">$data</$name>$newline" : " />$newline";  	else -		$result .= " />$newline"; +		$result .= isset($data) || !self::$voidtags[$name] ? ">$data</$name>$newline" : ">$newline";  	if ($GLOBALS['debug_utf8check'] && $charset == "utf-8")  		$result = it::any2utf8($result, "error in $name()");  |