传输换行符"\ n" [英] Transmitting newline character "\n"

查看:159
本文介绍了传输换行符"\ n"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

提供以下网址(可​​以尝试!)

Given the following URL (working, try it!)

https://select-test.wp3.rbsworldpay.com/wcc/purchase?instId=151711&cartId=28524&currency=GBP&amount=1401.49&testMode=100&name=Tom%20Gul&address=24%20House%20Road\nSome Place\nCounty&postcode=TR33%20999&email=email@mail.com&country=GB

如果您单击链接并转到付款页面,则地址框中的地址显示不正确,换行符显示为文本.

If you click on the link and go through to the payment page, the address in the address box is not displaying properly, the newline characters are displaying as text.

我尝试过<br />'s,但是没有运气,有人有任何想法吗?我需要获取地址以换行符显示.

I've tried passing through <br />'s but no luck, anyone got any ideas? I need to get the address to display with newlines.

逗号分隔符还可以,但我更希望能够使用换行符.谢谢你的帮助!一个可行的示例将是被接受的答案.

Commas are OK as a separator but i would much prefer being able to have newlines. Thanks for any help! A working example will be the accepted answer.

推荐答案

尝试在URL中使用%0A,就像您已经使用%20而不是空格字符一样.

Try using %0A in the URL, just like you've used %20 instead of the space character.

这篇关于传输换行符"\ n"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆