[*] FO : addTextFieldToProduct without Line feed, follow up https://github.com/PrestaShop/PrestaShop/pull/962#issuecomment-28294571
This commit is contained in:
@@ -1088,7 +1088,6 @@ class CartCore extends ObjectModel
|
|||||||
$id_customization = Db::getInstance()->Insert_ID();
|
$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`)
|
$query = 'INSERT INTO `'._DB_PREFIX_.'customized_data` (`id_customization`, `type`, `index`, `value`)
|
||||||
VALUES ('.(int)$id_customization.', '.(int)$type.', '.(int)$index.', \''.pSQL($field).'\')';
|
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)
|
public function addTextFieldToProduct($id_product, $index, $type, $text_value)
|
||||||
{
|
{
|
||||||
$text_value = str_replace(array("\n", "\r"), '', nl2br($text_value));
|
|
||||||
if (!_PS_MAGIC_QUOTES_GPC_){
|
if (!_PS_MAGIC_QUOTES_GPC_){
|
||||||
$text_value = str_replace('\\', '\\\\', $text_value);
|
$text_value = str_replace('\\', '\\\\', $text_value);
|
||||||
$text_value = str_replace('\'', '\\\'', $text_value);
|
$text_value = str_replace('\'', '\\\'', $text_value);
|
||||||
|
|||||||
Reference in New Issue
Block a user