VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: SteP[IT] on January 09, 2017, 11:10:38 AM

Title: Issue in user registration: ' (apostrophe) character stripped from user fields
Post by: SteP[IT] on January 09, 2017, 11:10:38 AM
Tested in VM 3.0.18.7 and 3.0.18.8 : when user fields FIRST NAME, LAST NAME, CITY contain the ' (apostrophe) character, it is stripped when the form is saved. This is a relevant issue, at least in my language (Italian), due to the fact that names and cities having that character are very common!!
It also happens when editing those fields in cart data and in user info data, from frontend and from admin side
Is there a way to fix it asap?
Thanks
Title: Re: Issue in user registration: ' (apostrophe) character stripped from user fields
Post by: Milbo on January 09, 2017, 21:43:19 PM
We have to change the validation http://php.net/manual/it/function.htmlspecialchars.php

and this ''' (singolo apice) diventa ''' soltanto con l'impostazione di ENT_QUOTES.

I am open for this. We need a single function, so that we replace it anywhere htmlspecialchars and http://php.net/manual/it/function.htmlspecialchars-decode.php

It think there was/is even a function in the code already. Then we could
change the default params
or
give options to set the params
Title: Re: Issue in user registration: ' (apostrophe) character stripped from user fields
Post by: SteP[IT] on January 10, 2017, 18:45:56 PM
More exactly, it seems to happen when the ' is typed at the beginning or at the end of a world, and separated by a space from it... like "name ' " or " ' name"
Title: Re: Issue in user registration: ' (apostrophe) character stripped from user fields
Post by: Milbo on January 11, 2017, 10:05:40 AM
As I said, you must play with the right options. We may have the problem then, that it works with ' but not with ". So the task is not simple.
Title: Re: Issue in user registration: ' (apostrophe) character stripped from user fields
Post by: SteP[IT] on January 11, 2017, 10:13:03 AM
OK, thanks for the hint
Title: Re: Issue in user registration: ' (apostrophe) character stripped from user fields
Post by: Milbo on January 12, 2017, 21:21:58 PM
uhm, for me the whole thing is not solved, when you find better params, ...