2013-08-29 4 views
0

아래의 모든 단계를 설명하고 각 단계에서 캡처 한 데이터를 설명했습니다.자바 스크립트에서 아약스 응답을받을 때 php urldecode가 올바르게 작동하지 않습니다.

이 경우에 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://stackoverflow.com/questions/2757911/how-to-decode-the-url-in-php-where-url-is-encoded-with-encodeuricomponent –

답변

0

>h 사이에 특별한 숨겨진 문자가 있습니다. 문자열을 브라우저에서 html로 볼 수 있습니다.