Bug with add to cart if customfields contain letters 'o','n' and 'e' in ( )

Started by WebStuff, June 05, 2013, 13:58:21 PM

Previous topic - Next topic

WebStuff

Just noticed a weird bug in add to cart, I have a couple of textinput customfields with values inside brackets like (Tinted Bronze), (Tinted Grey), (Tinted Green), etc.
(Tinted Grey) and (Tinted Green), etc. all work fine but  when the (Tinted Bronze) is added to the cart it gets cut down to (Tinted Br
I've done a few experiments and (lemonade) is also cut down to (lem
And (onahdjfhsufgdgse) is cut down to (
However (on8e) is not cutdown.
It seems if you have an open bracket then any word containing 'on' followed by any combination of letters in upper or lowercase and followed by an 'e' then close bracket, the string is cut down at the 'o' previous to the last 'e' if that makes sense e.g.
(Bron{any-combination-of-letters-in-upper-of-lowercase}e) is cut down to (Br
I suspect some sort of regex in the add to cart script.
Not a biggy I have worked around it by changing to curly brackets but thought I'd mention it.

Milbo

Please check the FE/helpers/cart.php around line 448-51, there are some filters set. Maybe the $value = vmFilter::hl( $customPl,array('deny_attribute'=>'*')); filter is too strong.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/