From 3c77928eb3fb5c3b81370995c40df225c64e8d69 Mon Sep 17 00:00:00 2001 From: norahmollo Date: Mon, 9 Feb 2015 11:46:03 -0400 Subject: [PATCH] PM-1518 Campo de Texto no guarda bien datos con comilla simple Se verifico el problema en campos de tipo hidden --- gulliver/system/class.xmlform.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php index 2f5a3e6ec..93458d03b 100755 --- a/gulliver/system/class.xmlform.php +++ b/gulliver/system/class.xmlform.php @@ -3443,11 +3443,12 @@ class XmlForm_Field_Hidden extends XmlForm_Field } } } + //$html .= 'value="' . $this->htmlentities( $value, ENT_QUOTES, 'utf-8' ) . '" '; if ($this->mode === 'edit') { - return 'NSFieldType() . ' name="form[' . $this->name . ']" type=\'hidden\' value=\'' . $value . '\'/>'; + return 'NSFieldType() . ' name="form[' . $this->name . ']" type=\'hidden\' value=\'' . $this->htmlentities( $value, ENT_QUOTES, 'utf-8' ) . '\'/>'; } elseif ($this->mode === 'view') { //a button? who wants a hidden field be showed like a button?? very strange. - return 'NSFieldType() . ' name="form[' . $this->name . ']" type=\'text\' value=\'' . $value . '\' style="display:none"/>'; + return 'NSFieldType() . ' name="form[' . $this->name . ']" type=\'text\' value=\'' . $this->htmlentities( $value, ENT_QUOTES, 'utf-8' ) . '\' style="display:none"/>'; } else { return $this->htmlentities( $value, ENT_COMPAT, 'utf-8' ); }