From 4d327a537fd8262dbb7a0fda613a968ccc16e207 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Tue, 12 Nov 2013 18:28:42 +0100 Subject: [PATCH] [*] FO : addTextFieldToProduct without Line feed, follow up https://github.com/PrestaShop/PrestaShop/pull/962#issuecomment-28294571 --- classes/Cart.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/classes/Cart.php b/classes/Cart.php index 0bceb12ab..681a1e93a 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -1088,7 +1088,6 @@ class CartCore extends ObjectModel $id_customization = Db::getInstance()->Insert_ID(); } - $field = preg_replace("//i", "\n", $field); $query = 'INSERT INTO `'._DB_PREFIX_.'customized_data` (`id_customization`, `type`, `index`, `value`) VALUES ('.(int)$id_customization.', '.(int)$type.', '.(int)$index.', \''.pSQL($field).'\')'; @@ -3059,7 +3058,6 @@ class CartCore extends ObjectModel */ public function addTextFieldToProduct($id_product, $index, $type, $text_value) { - $text_value = str_replace(array("\n", "\r"), '', nl2br($text_value)); if (!_PS_MAGIC_QUOTES_GPC_){ $text_value = str_replace('\\', '\\\\', $text_value); $text_value = str_replace('\'', '\\\'', $text_value);