From e65b9eeb342d51c5d0c954ab7cb7776a7be48c85 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 11 May 2010 13:48:16 +0000 Subject: [PATCH] Fixed problem with escaped characters in property values. -After passing values to smarty, the escaped characters weren't escaped anymore git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18374 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../plugins/addons/configViewer/class_commandVerifier.inc | 6 +++--- .../plugins/addons/configViewer/class_configViewer.inc | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gosa-core/plugins/addons/configViewer/class_commandVerifier.inc b/gosa-core/plugins/addons/configViewer/class_commandVerifier.inc index 9de879613..3ddcd86f7 100644 --- a/gosa-core/plugins/addons/configViewer/class_commandVerifier.inc +++ b/gosa-core/plugins/addons/configViewer/class_commandVerifier.inc @@ -64,9 +64,9 @@ class commandVerifier return($smarty->fetch(get_template_path('commandVerifier.tpl', 'TRUE'))); } -function save_object() -{ - if(isset($_POST['command'])) $this->command = get_post('command'); + function save_object() + { + if(isset($_POST['command'])) $this->command = get_post('command'); } function save() diff --git a/gosa-core/plugins/addons/configViewer/class_configViewer.inc b/gosa-core/plugins/addons/configViewer/class_configViewer.inc index f4a5584b6..02d3b73f8 100644 --- a/gosa-core/plugins/addons/configViewer/class_configViewer.inc +++ b/gosa-core/plugins/addons/configViewer/class_configViewer.inc @@ -147,6 +147,10 @@ class configViewer extends management $isize = "200px"; $name = "{$class[0]}:{$cn[0]}"; $value = htmlentities($value[0],ENT_COMPAT,'UTF-8'); + + // Add slashes to keep escaped values escaped after passing them to smarty. + $value = addslashes($value); + switch($type[0]){ case 'bool': $res = "