From: garvinhicking Date: Thu, 5 Oct 2006 14:05:57 +0000 (+0000) Subject: Proper unescape. Thanks to Stefan Esser X-Git-Tag: 1.0.3~10 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=15f6e8d962080304bfde36cb34bfa0b9ce4398f2;p=s9y.git Proper unescape. Thanks to Stefan Esser --- diff --git a/include/functions_config.inc.php b/include/functions_config.inc.php index 6ccb595..a644088 100644 --- a/include/functions_config.inc.php +++ b/include/functions_config.inc.php @@ -398,10 +398,10 @@ function serendipity_restoreVar(&$source, &$target) { * @return null */ function serendipity_JSsetCookie($name, $value) { - $name = strtr($name, array('\\'=>'\\\\',"'"=>"\\'",'"'=>'\\"',"\r"=>'\\r',"\n"=>'\\n',''<\/')); - $value = strtr($value, array('\\'=>'\\\\',"'"=>"\\'",'"'=>'\\"',"\r"=>'\\r',"\n"=>'\\n',''<\/')); + $name = htmlentities($name); + $value = urlencode($value); - echo '' . "\n"; + echo '' . "\n"; } /** diff --git a/include/functions_images.inc.php b/include/functions_images.inc.php index c45e9f0..2287881 100644 --- a/include/functions_images.inc.php +++ b/include/functions_images.inc.php @@ -1121,7 +1121,7 @@ function serendipity_displayImageList($page = 0, $lineBreak = NULL, $manage = fa echo serendipity_setFormToken(); foreach($serendipity['GET'] AS $g_key => $g_val) { if ( !is_array($g_val) && $g_key != 'page' ) { - echo ''; + echo ''; } } ?>