diff options
-rw-r--r-- | it_dbi.class | 4 | ||||
-rw-r--r-- | it_debug.class | 4 | ||||
-rw-r--r-- | it_html.class | 4 | ||||
-rw-r--r-- | it_xml.class | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/it_dbi.class b/it_dbi.class index 50f08b9..1303323 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -423,8 +423,8 @@ function clear($pp = true) { foreach ((array)$this->_fields + (array)$this->_localizedfields as $field => $dummy) unset($this->$field); - unset($this->_data); - unset($this->_key); + unset($this->_key, $this->_data); + $pp && $this->_read_post_process(); } diff --git a/it_debug.class b/it_debug.class index ec6de07..6050cf0 100644 --- a/it_debug.class +++ b/it_debug.class @@ -143,7 +143,7 @@ function dump($args) $item = "$red$item$nored"; if (isset($_SERVER['REMOTE_ADDR']) && !$plain) # html encode content and link any urls - $item = htmlspecialchars($item); + $item = htmlspecialchars($item, ENT_COMPAT, ini_get('default_charset')); if (preg_match('/^[\'"]/', $var)) $r .= "$item "; @@ -158,7 +158,7 @@ function dump($args) $r = str_repeat(" ", count(debug_backtrace(@constant('DEBUG_BACKTRACE_IGNORE_ARGS')))-3) . $r; # not it_html::Q(); we dont wanna load it_html in ultraclassloader debugging - $title = htmlspecialchars(it_debug::backtrace(array('skiplevels' => 1))); + $title = htmlspecialchars(it_debug::backtrace(array('skiplevels' => 1)), ENT_COMPAT, ini_get('default_charset')); if (isset($_SERVER['REMOTE_ADDR']) && !$plain) return "<pre title='$title' style='color:#c00; text-align:left; background-color:white; margin:0 0 0.4em; padding:0 0 0.4em 0; border-bottom:1px solid #ddd'>$r</pre>\n"; diff --git a/it_html.class b/it_html.class index 9203c98..92aa9ba 100644 --- a/it_html.class +++ b/it_html.class @@ -296,7 +296,7 @@ function _tag($name, $args) else if (isset($value) && $value !== true) # normal case: value { if (preg_match('/[<>&"\x00-\x08\x0a-\x0c\x0e-\x1f\x80-\x9f]/', $value)) # WARNING: copy/pasted from Q() - $result .= " $key=\"" . str_replace("\n", " ", htmlspecialchars($GLOBALS['it_html']->p['charset'] == "iso-8859-1" ? it_html::latinize($value) : $value)) . '"'; + $result .= " $key=\"" . str_replace("\n", " ", htmlspecialchars($GLOBALS['it_html']->p['charset'] == "iso-8859-1" ? it_html::latinize($value) : $value, ENT_COMPAT, $GLOBALS['it_html']->p['charset'])) . '"'; else $result .= " $key=\"$value\""; } @@ -477,7 +477,7 @@ function latinize($string) function Q($string) { if (preg_match('/[<>&"\x00-\x08\x0a-\x0c\x0e-\x1f\x80-\x9f]/', $string)) # WARNING: copy/pasted to _tag() - $string = htmlspecialchars($GLOBALS['it_html']->p['charset'] == "iso-8859-1" ? it_html::latinize($string) : $string); + $string = htmlspecialchars($GLOBALS['it_html']->p['charset'] == "iso-8859-1" ? it_html::latinize($string) : $string, ENT_COMPAT, $GLOBALS['it_html']->p['charset']); return $GLOBALS['debug_q'] && $string ? "<span style='background:#8FF'>$string</span>" : $string; } diff --git a/it_xml.class b/it_xml.class index 4c9cb1c..0679c69 100644 --- a/it_xml.class +++ b/it_xml.class @@ -269,7 +269,7 @@ function to_xml($p = array()) $p['nextindentation'] .= $p['indent']; foreach ((array)$this->attr as $key => $value) - $tag .= " $key=\"" . htmlspecialchars($value) . '"'; + $tag .= " $key=\"" . htmlspecialchars($value, ENT_COMPAT, ini_get('default_charset')) . '"'; $vars = get_object_vars($this); @@ -302,7 +302,7 @@ function to_xml($p = array()) } } else if ($key == 'val') - $body .= htmlspecialchars($values); + $body .= htmlspecialchars($values, ENT_COMPAT, ini_get('default_charset')); } } |