1
0

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:
onli
2014-11-23 23:41:08 +01:00
parent 6c26d1b3f6
commit 92afc37753
50 changed files with 208 additions and 175 deletions

View File

@ -113,7 +113,7 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr
}
if (!empty($serendipity['GET']['url'])) {
$entry['body'] .= "\n" . '<a class="block_level" href="' . htmlspecialchars(utf8_decode(urldecode($serendipity['GET']['url']))) . '">' . $entry['title'] . '</a>';
$entry['body'] .= "\n" . '<a class="block_level" href="' . serendipity_specialchars(utf8_decode(urldecode($serendipity['GET']['url']))) . '">' . $entry['title'] . '</a>';
}
$template_vars['formToken'] = serendipity_setFormToken();