角色 +在 HTTP Post 中转换为 %2B
我正在向我们在工作中使用的 GM 脚本添加功能,但是当尝试发布(我可以跨站点添加)到另一个页面时,我的 CMD 发布值与页面上的值不同。
它应该是 Access+My+Account+Info,但发布的值变为 Access%2BMy%2BAccount%2BInfo。
所以我想我的问题是:什么正在逃避我的价值以及如何让它不逃避?如果没有办法摆脱它,有人有任何解决方法的想法吗?
谢谢!
I'm adding functionality to a GM script we use here at work, but when trying to post (cross site may I add) to another page, my posting value of CMD is different than what it is on the page.
It's supposed to be Access+My+Account+Info but the value that is posted becomes Access%2BMy%2BAccount%2BInfo.
So I guess my question is: What's escaping my value and how do I make it not escape? And if there's no way to unescape it, does anyone have any ideas of a workaround?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
/data/v50.0/query?q=SELECT Id from Case
这对我有用。用空格代替“+”
/data/v50.0/query?q=SELECT Id from Case
This worked for me. Give space instead of '+'
%2B
是+
的代码。您(或您正在使用的任何框架)应该已经在服务器端解码 POST 数据......%2B
is the code for a+
. You (or whatever framework you're using) should already be decoding the POST data server-side...快速说明一下:如果您想解码路径段,可以使用 UriUtils(spring 框架):
Uri 路径段与 HTML 转义字符不同(请参阅 列表)。这是一个例子:
Just a quick remark: If you want to decode a path segment, you can use UriUtils (spring framework):
Uri path segments are different from HTML escape chars (see list). Here is an example: