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

Link to comment
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?

Link to comment
Share on other sites

×
×
  • Create New...