Introduce serendipity_specialchars-wrapper for encoding bug (#236)
PHP 5.4 sets UTF-8 as the default for htmlspecialchars, htmlentities and html_entity_decode. The first two will echo an empty string when given a string with umlauts. This commits introduces serendipity_specialchar-wrapper that are meant to be a temporary solution for the s9y-core until PHP 5.6 fixed the bug, so the native charset option of s9y continues to work.
This commit is contained in:
@ -129,7 +129,7 @@ class serendipity_smarty_emulator {
|
||||
} elseif (function_exists($funcname)) {
|
||||
return call_user_func($funcname, $params, $this);
|
||||
} else {
|
||||
return "<span class='msg_error'>ERROR: " . htmlspecialchars($funcname) . " NOT FOUND.</span>";
|
||||
return "<span class='msg_error'>ERROR: " . serendipity_specialchars($funcname) . " NOT FOUND.</span>";
|
||||
}
|
||||
}
|
||||
|
||||
@ -326,7 +326,7 @@ class serendipity_smarty_emulator_xml extends serendipity_smarty_emulator {
|
||||
$this->assign($val, null, $level + 1);
|
||||
echo str_repeat("\t", $level) . "</$closekey>\n";
|
||||
} else {
|
||||
echo str_repeat("\t", $level) . "<$openkey>" . htmlspecialchars($val) . "</$closekey>\n";
|
||||
echo str_repeat("\t", $level) . "<$openkey>" . serendipity_specialchars($val) . "</$closekey>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user