Given the following URL (work, try it!)
https://select-test.wp3.rbsworldpay.com/wcc/purchase?instId=151711&cartId=28524¤cy=GBP&amount=1401.49&testMode=100&name=Tom%20Gul&address=24%20House%20Road \ nEach Place \ nCounty & n = 3333 % 20999 & email=email@mail.com& country = GB
If you click on the link and go to the payment page, the address in the address field is not displayed correctly, new line characters are displayed as text.
I tried to get through <br />'s , but no luck, does anyone have any ideas? I need the address to be displayed with newlines.
<br />'s
Commas are fine as a separator, but I would prefer to have newlines. Thanks for any help! A working example would be the accepted answer.
Try using %0A in the url, just like you used %20 instead of a space character.
%0A
%20
Try replacing \n with %0A in the same way that you replaced spaces with %20 .
\n
Use %0A (URL encoding) instead of \n (C encoding).
late, but if anyone encounters this, javascript has an encodeURI method
encodeURI