The branch, master has been updated
via 863d8f2e52373f404ba96fa79c406481277764b1 (commit)
from 26622d7fdae775bb8ef5e331fec9b2c963024e58 (commit)
- Log -----------------------------------------------------------------
commit 863d8f2e52373f404ba96fa79c406481277764b1
Author: Michal Čihař <[email protected]>
Date: Mon Aug 22 09:06:31 2011 +0200
Support for not escaped js code
-----------------------------------------------------------------------
Summary of changes:
libraries/core.lib.php | 4 ++--
libraries/js_escape.lib.php | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/libraries/core.lib.php b/libraries/core.lib.php
index 29d2f43..d1348ed 100644
--- a/libraries/core.lib.php
+++ b/libraries/core.lib.php
@@ -726,9 +726,9 @@ function PMA_AddJSCode($str)
* @param mixed $value Value to set, can be either string or array of strings
*
*/
-function PMA_AddJSVar($key, $value)
+function PMA_AddJSVar($key, $value, $escape = true)
{
- PMA_AddJsCode(PMA_getJsValue($key, $value));
+ PMA_AddJsCode(PMA_getJsValue($key, $value, $escape));
}
?>
diff --git a/libraries/js_escape.lib.php b/libraries/js_escape.lib.php
index 87d8855..cb2dbd1 100644
--- a/libraries/js_escape.lib.php
+++ b/libraries/js_escape.lib.php
@@ -87,10 +87,12 @@ function PMA_formatJsVal($value)
*
* @return string Javascript code.
*/
-function PMA_getJsValue($key, $value)
+function PMA_getJsValue($key, $value, $escape = true)
{
$result = $key . ' = ';
- if (is_array($value)) {
+ if (!$escape) {
+ $result .= $value;
+ } elseif (is_array($value)) {
$result .= '[';
foreach ($value as $id => $val) {
$result .= PMA_formatJsVal($value) . ",";
hooks/post-receive
--
phpMyAdmin
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model
configuration take the hassle out of deploying and managing Subversion and
the tools developers use with it. Learn more about uberSVN and get a free
download at: http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Phpmyadmin-git mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/phpmyadmin-git