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:
@ -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'])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user