drfls28608 2016-06-03 23:01
浏览 29

以html格式内容编码url

I have a form where the user inputs a url in a text input field. For example:

http://www.theguardian.com/world/video/2016/may/20/there-are-no-words-to-describe-how-bad-it-is-india-endures-severe-heatwave-video

I use a javascript function using both encodeURI(url) and encodeURIComponent(url) so the string from the form field looks like this when it is posted:

http%3A%2F%2Fwww.theguardian.com%2Fworld%2Fvideo%2F2016%2Fmay%2F20%2Fthere-are-no-words-to-describe-how-bad-it-is-india-endures-severe-heatwave-video

However, my Apache Web Server returns a 403 error when I post the form. If I remove this input from the form, there is no problem.

What else can I do to avoid the error?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 易康econgnition精度验证
    • ¥15 线程问题判断多次进入
    • ¥15 msix packaging tool打包问题
    • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
    • ¥15 python的qt5界面
    • ¥15 无线电能传输系统MATLAB仿真问题
    • ¥50 如何用脚本实现输入法的热键设置
    • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
    • ¥30 深度学习,前后端连接
    • ¥15 孟德尔随机化结果不一致