From 94f73e75e65ca144be323c2c9f7b6823c4d1af64 Mon Sep 17 00:00:00 2001 From: Koji Tanaka Date: Wed, 11 Jan 2023 08:20:30 +0900 Subject: [PATCH] fix: Checking with get_magic_quotes_gpc() is no longer necessary. --- lib/Cake/View/Helper.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/Cake/View/Helper.php b/lib/Cake/View/Helper.php index 98080a3bf..ac8faf818 100644 --- a/lib/Cake/View/Helper.php +++ b/lib/Cake/View/Helper.php @@ -958,11 +958,7 @@ class Helper extends CakeObject { * @return void */ protected function _clean() { - if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { - $this->_cleaned = stripslashes($this->_tainted); - } else { - $this->_cleaned = $this->_tainted; - } + $this->_cleaned = $this->_tainted; $this->_cleaned = str_replace(array("&", "<", ">"), array("&amp;", "&lt;", "&gt;"), $this->_cleaned); $this->_cleaned = preg_replace('#(&\#*\w+)[\x00-\x20]+;#u', "$1;", $this->_cleaned);