From 592e7d46895029f462369708085631d67494ec56 Mon Sep 17 00:00:00 2001 From: Louis Racicot Date: Wed, 6 Mar 2013 10:04:55 -0500 Subject: Full unicode support for the product name. --- system/libraries/Cart.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/libraries/Cart.php') diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php index d5664f22c..c224a6dc9 100644 --- a/system/libraries/Cart.php +++ b/system/libraries/Cart.php @@ -51,7 +51,7 @@ class CI_Cart { * * @var string */ - public $product_name_rules = '\.\:\-_ a-zÀ-ÿ0-9'; + public $product_name_rules = '\.\:\- \w'; /** * only allow safe product names @@ -214,7 +214,7 @@ class CI_Cart { // Validate the product name. It can only be alpha-numeric, dashes, underscores, colons or periods. // Note: These can be user-specified by setting the $this->product_name_rules variable. - if ($this->product_name_safe && ! preg_match('/^['.$this->product_name_rules.']+$/i', $items['name'])) + if ($this->product_name_safe && ! preg_match('/^['.$this->product_name_rules.']+$/iu', $items['name'])) { log_message('error', 'An invalid name was submitted as the product name: '.$items['name'].' The name can only contain alpha-numeric characters, dashes, underscores, colons, and spaces'); return FALSE; -- cgit v1.2.3-24-g4f1b