diff options
| author | Urban Müller | 2010-10-08 16:28:35 +0000 | 
|---|---|---|
| committer | Urban Müller | 2010-10-08 16:28:35 +0000 | 
| commit | 4802489e5ac837b69aa5a21dd66145aa35bbca0a (patch) | |
| tree | f7dc2b2a5feef8fdff77cb5353d85df69c350029 | |
| parent | d75019d1df989fdb8781b573f8c58b3286c66786 (diff) | |
| download | itools-4802489e5ac837b69aa5a21dd66145aa35bbca0a.tar.gz itools-4802489e5ac837b69aa5a21dd66145aa35bbca0a.tar.bz2 itools-4802489e5ac837b69aa5a21dd66145aa35bbca0a.zip  | |
reverted fast version for now
| -rw-r--r-- | it_html.class | 39 | 
1 files changed, 1 insertions, 38 deletions
diff --git a/it_html.class b/it_html.class index a0211f8..be13fe4 100644 --- a/it_html.class +++ b/it_html.class @@ -72,16 +72,7 @@ function it_html($p = array())  	foreach (array_merge(explode(',', $this->p['tags']), explode(',', $this->p['moretags'])) as $func)  	{  		if (!function_exists($func) && $func) -		{ -			if (!$this->p['prettyprint'] && $this->p['charset'] == "iso-8859-1" && $this->p['htmltype'] == "html" && !$GLOBALS['debug_srclines']) -			{ -				$emptycloser = preg_match('/^(a|div|iframe|pre|script|span|td|textarea)$/i', $func) ? "</$func>" : ""; -				$newline = isset($this->hasnonewline[$func]) ? '' : "\\n"; -				$code[$func] = "function $func() { \$args = func_get_args(); return \$GLOBALS['{$this->p['name']}']->_tag_fast('$func', \$args, \"$newline\", '$emptycloser'); }"; -			} -			else  -				$code[$func] = "function $func() { \$args = func_get_args(); return \$GLOBALS['{$this->p['name']}']->_tag('$func', \$args); }"; -		} +			$code[$func] = "function $func() { \$args = func_get_args(); return \$GLOBALS['{$this->p['name']}']->_tag('$func', \$args); }";  	}  	# Create global functions for it_html methods @@ -259,34 +250,6 @@ function _parse_args($args)  /**   * INTERNAL: Create html tag from name and args array (the arguments of the parent function)   */ -function _tag_fast($name, $args, $newline, $emptycloser) -{ -	foreach ($args as $arg) -	{ -		if (is_array($arg)) -		{ -			foreach ($arg as $key => $value) -			{ -				if (is_numeric($key)) -					$content .= $value; -				else if (is_string($value) || is_numeric($value)) -				{ -					if (preg_match('/[<>&"\x00-\x08\x0a-\x0c\x0e-\x1f\x80-\x9f]/', $value)) # WARNING: copy/pasted from Q() -						$attrs .= " $key=\"" . str_replace("\n", "
", htmlspecialchars(it_html::latinize($value))) . '"'; -					else -						$attrs .= " $key=\"$value\""; -				} -				else if ($value === true) -					$attrs .= " $key"; -			} -		} -		else -			$content .= $arg; -	} - -	return isset($content) ? "<$name$attrs>$content</$name>$newline" : "<$name$attrs>$emptycloser$newline"; -} -  function _tag($name, $args)  {  	list($data, $attr) = $this->_parse_args($args);  |