php urldecode在javascript中从ajax接收到响应时无法正常工作

问题描述:

我已经解释了以下所有步骤并在每个阶段捕获了数据。php urldecode在javascript中从ajax接收到响应时无法正常工作

我不明白为什么urldecode在这种情况下无法正常工作?

Original String: 
    <p>​hello</p> 

Javascript encodeURIComponent() of above string: 
    %3Cp%3E%E2%80%8Bhello%3C%2Fp%3E 

Sent via Ajax: 
    %3Cp%3E%E2%80%8Bhello%3C%2Fp%3E 

PHP: Echo $_REQUEST['string']; 
    %3Cp%3E%E2%80%8Bhello%3C%2Fp%3E 

PHP: urldecode of above string 
    ​hello 
+0

这不是您尝试编码的URI。 – jeff

+0

是的,请在此表单上手动测试:http://meyerweb.com/eric/tools/dencoder/ –

+0

您是否尝试过在此解决方案? http://*.com/questions/2757911/how-to-decode-the-url-in-php-where-url-is-encoded-with-encodeuricomponent –

>h之间的特殊隐藏字符。如果您在浏览器中将该字符串视为html,您将能够看到它。