From fd4cc1f95326c17443cadab7b115acc614b7ed59 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 10 Jun 2010 14:31:59 +0000 Subject: [PATCH] allow json in body on(Load|Unload|Resize) tags --- phpgwapi/inc/class.egw_framework.inc.php | 2 +- phpgwapi/templates/idots/class.idots_framework.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.egw_framework.inc.php b/phpgwapi/inc/class.egw_framework.inc.php index f6f4e61293..43a24e4160 100644 --- a/phpgwapi/inc/class.egw_framework.inc.php +++ b/phpgwapi/inc/class.egw_framework.inc.php @@ -979,7 +979,7 @@ abstract class egw_framework { if (!empty($data)) { - $js .= ' '.$what.'="' . str_replace(array('\\\'','"','\\','''),array(''','\\"','\\\\','\\\''),$data) . '"'; + $js .= ' '.$what.'="' . htmlspecialchars($data) . '"'; } } return $js; diff --git a/phpgwapi/templates/idots/class.idots_framework.inc.php b/phpgwapi/templates/idots/class.idots_framework.inc.php index 08e3634d2c..c23379ed13 100644 --- a/phpgwapi/templates/idots/class.idots_framework.inc.php +++ b/phpgwapi/templates/idots/class.idots_framework.inc.php @@ -97,7 +97,7 @@ class idots_framework extends egw_framework // the instanciation of the template has to be here and not in the constructor, // as the old Template class has problems if restored from the session (php-restore) - $this->tpl = new Template(EGW_TEMPLATE_DIR); + $this->tpl = new Template(EGW_TEMPLATE_DIR,'keep'); $this->tpl->set_file(array('_head' => 'head.tpl')); $this->tpl->set_block('_head','head');