Passing the newline character "\ n"

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.

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.

+78
url html-encode html-entities
Oct 06 '10 at
source share
4 answers

Try using %0A in the url, just like you used %20 instead of a space character.

+219
Oct 06 '10 at 11:00
source share

Try replacing \n with %0A in the same way that you replaced spaces with %20 .

+42
Oct 06 '10 at 11:00
source share

Use %0A (URL encoding) instead of \n (C encoding).

+20
Oct 06 '10 at 11:00
source share

late, but if anyone encounters this, javascript has an encodeURI method

+2
May 17 '17 at 19:20
source share