From: Michael M Slusarz Date: Thu, 29 Jul 2010 16:24:25 +0000 (-0600) Subject: Remove Horde_Browser::escapeJSCode() X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=84ff50960b31e40ffedb0719088f86760e5d352c;p=horde.git Remove Horde_Browser::escapeJSCode() This is handled by json encoding now. --- diff --git a/framework/Browser/lib/Horde/Browser.php b/framework/Browser/lib/Horde/Browser.php index a1ddf2484..1e7f435a8 100644 --- a/framework/Browser/lib/Horde/Browser.php +++ b/framework/Browser/lib/Horde/Browser.php @@ -1194,32 +1194,6 @@ class Horde_Browser } /** - * Escapes characters in javascript code if the browser requires it. %23, - * %26, and %2B (for some browsers) and %27 need to be escaped or else - * javascript will interpret it as a single quote, pound sign, or - * ampersand and refuse to work. - * - * @param string $code The JS code to escape. - * - * @return string The escaped code. - */ - public function escapeJSCode($code) - { - $from = $to = array(); - - if ($this->isBrowser('msie') || - ($this->isBrowser('mozilla') && ($this->getMajor() >= 5)) || - $this->isBrowser('konqueror')) { - $from = array('%23', '%26', '%2B'); - $to = array('%2523', '%2526', '%252B'); - } - $from[] = '%27'; - $to[] = '\%27'; - - return str_replace($from, $to, $code); - } - - /** * Sets the IE version in the session. * * @param string $ver The IE Version string. diff --git a/framework/Browser/package.xml b/framework/Browser/package.xml index 6678e5e75..2bf4b7e9e 100644 --- a/framework/Browser/package.xml +++ b/framework/Browser/package.xml @@ -25,7 +25,8 @@ about the current user's browser and its capabilities. beta LGPL - * Add Horde_Browser_Exception::. + * Remove Horde_Browser::escapeJSCode(). + * Add Horde_Browser_Exception::. * Initial Horde 4 package.