[*] FO : addTextFieldToProduct without Line feed, follow up https://github.com/PrestaShop/PrestaShop/pull/962#issuecomment-28294571

This commit is contained in:
gRoussac
2013-11-12 18:28:42 +01:00
parent 5e4382eb08
commit 4d327a537f

View File

@@ -1088,7 +1088,6 @@ class CartCore extends ObjectModel
$id_customization = Db::getInstance()->Insert_ID();
}
$field = preg_replace("/<br\s*\/?>/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);