Jump to content

Recommended Posts

what purpose has this validation?

public static function isCatalogName($name)
{
return preg_match('/^[^<>;=#{}]*$/u', $name);
}

it doesnt allow me to import product with those charecters in name, im thinking about just returning true, but dunno if it can corrupt something

Share this post


Link to post
Share on other sites

I would not recommend changing this...the results may be (are) unpredictable...

 

removing the check could create a hack pathway for virus injection...probably wouldn't happen...but well...it could :)

Share this post


Link to post
Share on other sites

  • 9 months later...

Sorry for reviving dead topics, but:

 

I have pretty much the same issue, for instance I have a children's maths book, and it's titled "1+1=2". Now, I would be OK with an URL rewrite that ends up with 1_1_2 or something, but I do need the product to display as "1+1=2" in searches or on the product sheet. (I also have products with #, $, < and > in the product titles, and ; are all over the place in titles, descriptions and everything)

 

Since the general consensus seems to be not to rewrite this code snippet for the name, how would you go about showing these symbols in what is displayed on screen to the end customers? Having a different field than Name be basis for what is displayed?

Share this post


Link to post
Share on other sites

 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More