Rever this for the release, re-introduce later

This commit is contained in:
Garvin Hicking 2017-04-09 09:35:14 +02:00
parent 8fee805ca1
commit 701ebe442d
2 changed files with 4 additions and 15 deletions

View File

@ -518,9 +518,6 @@ if (function_exists('date_default_timezone_get')) {
* native encoded strings containing umlauts. This wrapper should to be used in the core until PHP 5.6 fixes the bug. * 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) { function serendipity_specialchars($string, $flags = null, $encoding = LANG_CHARSET, $double_encode = true) {
if (is_array($string)) {
return '';
}
if ($flags == null) { if ($flags == null) {
if (defined('ENT_HTML401')) { if (defined('ENT_HTML401')) {
// Added with PHP 5.4.x // Added with PHP 5.4.x
@ -537,17 +534,13 @@ function serendipity_specialchars($string, $flags = null, $encoding = LANG_CHARS
$encoding = 'UTF-8'; $encoding = 'UTF-8';
} }
return htmlspecialchars((string)$string, $flags, $encoding, $double_encode); return htmlspecialchars($string, $flags, $encoding, $double_encode);
} }
/** /**
* see serendipity_specialchars * see serendipity_specialchars
*/ */
function serendipity_entities($string, $flags = null, $encoding = LANG_CHARSET, $double_encode = true) { function serendipity_entities($string, $flags = null, $encoding = LANG_CHARSET, $double_encode = true) {
if (is_array($string)) {
return '';
}
if ($flags == null) { if ($flags == null) {
if (defined('ENT_HTML401')) { if (defined('ENT_HTML401')) {
// Added with PHP 5.4.x // Added with PHP 5.4.x
@ -560,17 +553,13 @@ function serendipity_entities($string, $flags = null, $encoding = LANG_CHARSET,
if ($encoding == 'LANG_CHARSET') { if ($encoding == 'LANG_CHARSET') {
$encoding = 'UTF-8'; $encoding = 'UTF-8';
} }
return htmlentities((string)$string, $flags, $encoding, $double_encode); return htmlentities($string, $flags, $encoding, $double_encode);
} }
/** /**
* serendipity_specialchars * serendipity_specialchars
*/ */
function serendipity_entity_decode($string, $flags = null, $encoding = LANG_CHARSET) { function serendipity_entity_decode($string, $flags = null, $encoding = LANG_CHARSET) {
if (is_array($string)) {
return '';
}
if ($flags == null) { if ($flags == null) {
# NOTE: ENT_SUBSTITUTE does not exist for this function, and the documentation does not specify that it will # 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 # ever echo empty strings on charset errors
@ -585,7 +574,7 @@ function serendipity_entity_decode($string, $flags = null, $encoding = LANG_CHAR
if ($encoding == 'LANG_CHARSET') { if ($encoding == 'LANG_CHARSET') {
$encoding = 'UTF-8'; $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 : */ /* vim: set sts=4 ts=4 expandtab : */

View File

@ -47,7 +47,7 @@ if (defined('USE_MEMSNAP')) {
} }
// The version string // 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'. // 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'.