From 3902036477bbc0ce473b48708cd88be06f23d07c Mon Sep 17 00:00:00 2001 From: "green-ponies (jgen)" Date: Wed, 18 Apr 2012 02:20:42 -0400 Subject: [PATCH] Avoid breaking things. --- core/util.inc.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/util.inc.php b/core/util.inc.php index 2051a5bd..0505a228 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -37,7 +37,7 @@ function url_escape($input) { /* Shish: I have a feeling that these three lines are important, possibly for searching for tags with slashes in them like fate/stay_night green-ponies: indeed~ - */ + $input = str_replace('^', '^^', $input); $input = str_replace('/', '^s', $input); $input = str_replace('\\', '^b', $input); @@ -45,21 +45,21 @@ function url_escape($input) { /* The function idn_to_ascii is used to support Unicode domains / URLs as well. See here for more: http://php.net/manual/en/function.filter-var.php However, it is only supported by PHP version 5.3 and up - */ + if (function_exists('idn_to_ascii')) { return filter_var(idn_to_ascii($input), FILTER_SANITIZE_URL); } else { return filter_var($input, FILTER_SANITIZE_URL); } - - /*if(is_null($input)) { + */ + if(is_null($input)) { return ""; } $input = str_replace('^', '^^', $input); $input = str_replace('/', '^s', $input); $input = str_replace('\\', '^b', $input); $input = rawurlencode($input); - return $input;*/ + return $input; } /**