diff options
Diffstat (limited to 'it_html.class')
-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); |