From 15f6e8d962080304bfde36cb34bfa0b9ce4398f2 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Thu, 5 Oct 2006 14:05:57 +0000 Subject: [PATCH] Proper unescape. Thanks to Stefan Esser --- include/functions_config.inc.php | 6 +++--- include/functions_images.inc.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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 ''; } } ?> -- 2.39.5