News:

Support the VirtueMart project and become a member

Main Menu

+ in billing name and phone becomes a space (VM 4.8.4)

Started by sandomatyas, October 29, 2026, 17:19:30 PM

Previous topic - Next topic

sandomatyas

VirtueMart 4.8.4. After checkout, a literal + in the billing name and phone is stored as a space. B+T Vill. Ltd becomes B T Vill. Ltd. A leading + on a phone number disappears.

prepareFieldDataSave() reads every user field with vRequest::getString($name, '', $data). Because the third argument is the already decoded data array, getString() calls filterUrl(), which runs urldecode(). PHP has already decoded the POST, so + becomes a space.

Milbo

Vm5 has a new function for this. Maybe I make it configurable, because it makes sense to change + against 00 or vice versa. Other problem is the / and - and some use (). But it makes sense to have a small tool, which normalises the input. Btw that is the reason that some shops show a fixed country number. For example you select germany and see directly a fixed +49
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/