Skip to content

Commit

Permalink
Rever this for the release, re-introduce later
Browse files Browse the repository at this point in the history
  • Loading branch information
garvinhicking committed Apr 9, 2017
1 parent 8fee805 commit 701ebe4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
17 changes: 3 additions & 14 deletions include/compat.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,6 @@ function serendipity_die($html) {
* native encoded strings containing umlauts. This wrapper should to be used in the core until PHP 5.6 fixes the bug.
*/
function serendipity_specialchars($string, $flags = null, $encoding = LANG_CHARSET, $double_encode = true) {
if (is_array($string)) {
return '';
}
if ($flags == null) {
if (defined('ENT_HTML401')) {
// Added with PHP 5.4.x
Expand All @@ -537,17 +534,13 @@ function serendipity_specialchars($string, $flags = null, $encoding = LANG_CHARS
$encoding = 'UTF-8';
}

return htmlspecialchars((string)$string, $flags, $encoding, $double_encode);
return htmlspecialchars($string, $flags, $encoding, $double_encode);
}

/**
* see serendipity_specialchars
*/
function serendipity_entities($string, $flags = null, $encoding = LANG_CHARSET, $double_encode = true) {
if (is_array($string)) {
return '';
}

if ($flags == null) {
if (defined('ENT_HTML401')) {
// Added with PHP 5.4.x
Expand All @@ -560,17 +553,13 @@ function serendipity_entities($string, $flags = null, $encoding = LANG_CHARSET,
if ($encoding == 'LANG_CHARSET') {
$encoding = 'UTF-8';
}
return htmlentities((string)$string, $flags, $encoding, $double_encode);
return htmlentities($string, $flags, $encoding, $double_encode);
}

/**
* serendipity_specialchars
*/
function serendipity_entity_decode($string, $flags = null, $encoding = LANG_CHARSET) {
if (is_array($string)) {
return '';
}

if ($flags == null) {
# NOTE: ENT_SUBSTITUTE does not exist for this function, and the documentation does not specify that it will
# ever echo empty strings on charset errors
Expand All @@ -585,7 +574,7 @@ function serendipity_entity_decode($string, $flags = null, $encoding = LANG_CHAR
if ($encoding == 'LANG_CHARSET') {
$encoding = 'UTF-8';
}
return html_entity_decode((string)$string, $flags, $encoding);
return html_entity_decode($string, $flags, $encoding);
}

/* vim: set sts=4 ts=4 expandtab : */
2 changes: 1 addition & 1 deletion serendipity_config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}

// The version string
$serendipity['version'] = '2.1.1-beta1';
$serendipity['version'] = '2.1.1';


// Setting this to 'false' will enable debugging output. All alpha/beta/cvs snapshot versions will emit debug information by default. To increase the debug level (to enable Smarty debugging), set this flag to 'debug'.
Expand Down

0 comments on commit 701ebe4

Please sign in to comment.