0

I have explained all the steps below and captured data at each stage.

I can't understand why urldecode is not working correctly in this case?

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
parte bena
  • 25
  • 1
  • 5

1 Answers1

0

There's a special hidden character between > and h. You'll be able to see it if you view the string as html in a browser.

subroutines
  • 1,458
  • 1
  • 12
  • 16