summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorLouis Racicot <info@louisracicot.com>2013-03-06 16:04:55 +0100
committerLouis Racicot <info@louisracicot.com>2013-03-06 16:04:55 +0100
commit592e7d46895029f462369708085631d67494ec56 (patch)
tree05561fdb656e38d4513c32ecadb4a905422fd91e /system/libraries
parent837b203bcbd52fc8fc909a3dc8c5031fb4dc3379 (diff)
Full unicode support for the product name.
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Cart.php4
1 files changed, 2 insertions, 2 deletions
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;