summaryrefslogtreecommitdiff
path: root/it_html.class
diff options
context:
space:
mode:
authorChristian Schneider2012-03-20 17:18:20 +0000
committerChristian Schneider2012-03-20 17:18:20 +0000
commit8a9d596c3c9e112025e594bff402a479c149c2d9 (patch)
treeb0b430df897a49c108e4ac3218ab308ccd202bae /it_html.class
parent5781eba8b158ecb3fc6d62ebe13223168534e862 (diff)
downloaditools-8a9d596c3c9e112025e594bff402a479c149c2d9.tar.gz
itools-8a9d596c3c9e112025e594bff402a479c149c2d9.tar.bz2
itools-8a9d596c3c9e112025e594bff402a479c149c2d9.zip
Explicitely give encoding for htmlspecialchars for PHP 5.4 compatibility
Diffstat (limited to 'it_html.class')
-rw-r--r--it_html.class4
1 files changed, 2 insertions, 2 deletions
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", "&#10;", htmlspecialchars($GLOBALS['it_html']->p['charset'] == "iso-8859-1" ? it_html::latinize($value) : $value)) . '"';
+ $result .= " $key=\"" . str_replace("\n", "&#10;", 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;
}