Kimi Posted July 28, 2013 Share Posted July 28, 2013 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 More sharing options...
El Patron Posted July 28, 2013 Share Posted July 28, 2013 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 Link to comment Share on other sites More sharing options...
RogueWaveLimited Posted July 28, 2013 Share Posted July 28, 2013 You should not "fix" this. Names with any of those characters will cause problems in other parts of PS. Link to comment Share on other sites More sharing options...
jaggop Posted May 12, 2014 Share Posted May 12, 2014 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 More sharing options...
Recommended Posts