Skip to content

Commit

Permalink
[*] FO : addTextFieldToProduct without Line feed, follow up #962 (com…
Browse files Browse the repository at this point in the history
  • Loading branch information
gRoussac committed Nov 12, 2013
1 parent 5e4382e commit 4d327a5
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions classes/Cart.php
Expand Up @@ -1088,7 +1088,6 @@ public function _addCustomization($id_product, $id_product_attribute, $index, $t
$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).'\')';

Expand Down Expand Up @@ -3059,7 +3058,6 @@ public static function getCartIdByOrderId($id_order)
*/
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);
Expand Down

0 comments on commit 4d327a5

Please sign in to comment.