From b7ca52165b1f8251c2229d345fc421914ffd98ea Mon Sep 17 00:00:00 2001 From: Shish Date: Fri, 23 Apr 2010 03:31:10 +0100 Subject: [PATCH] double-escape backslashes as well as forward --- core/util.inc.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/util.inc.php b/core/util.inc.php index 7b60a693..fa004c25 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -32,6 +32,7 @@ function int_escape($input) { function url_escape($input) { $input = str_replace('^', '^^', $input); $input = str_replace('/', '^s', $input); + $input = str_replace('\\', '^b', $input); $input = rawurlencode($input); return $input; } @@ -803,6 +804,7 @@ function _decaret($str) { $i++; if($str[$i] == "^") $out .= "^"; if($str[$i] == "s") $out .= "/"; + if($str[$i] == "b") $out .= "\\"; } else { $out .= $str[$i];