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

@ -939,15 +939,15 @@ function serendipity_displayTopUrlList($list, $limit, $use_links = true, $interv
if ($use_links) {
$output .= sprintf(
'<span class="block_level"><a href="%1$s://%2$s" title="%2$s" >%2$s</a> (%3$s)</span>',
htmlspecialchars($row['scheme']),
htmlspecialchars($row['host']),
htmlspecialchars($row['total'])
serendipity_specialchars($row['scheme']),
serendipity_specialchars($row['host']),
serendipity_specialchars($row['total'])
);
} else {
$output .= sprintf(
'<span class="block_level">%1$s (%2$s)</span>',
htmlspecialchars($row['host']),
htmlspecialchars($row['total'])
serendipity_specialchars($row['host']),
serendipity_specialchars($row['total'])
);
}
}