From 7081737f12470dfe4d0d677524780821f9291294 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 15 May 2020 12:25:46 -0700 Subject: [PATCH] Fixes #4165 - Custom field problem with single quote value. --- e107_handlers/e_customfields_class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e107_handlers/e_customfields_class.php b/e107_handlers/e_customfields_class.php index a2c2774b0..8576489da 100644 --- a/e107_handlers/e_customfields_class.php +++ b/e107_handlers/e_customfields_class.php @@ -440,9 +440,11 @@ $ui->getModel()->set($fieldname, null); + $tp = e107::getParser(); + foreach($this->_data as $key=>$value) { - $ui->getModel()->set($fieldname.'__'.$key, $value); + $ui->getModel()->set($fieldname.'__'.$key, $tp->toDB($value)); // e107::getDebug()->log($fieldname.'__'.$key.": ".$value); }