2

Code snip:

U8 test[20] = "+45%201234%205678";
printf("\n%s\n",test);
unescape_html(test);
printf("%s\n",test);

Output

+45%201234%205678
45 1234 5678

Where did my "+" sign go? Error or feature?

H.J.
  • 25
  • 4

2 Answers2

2

in URL encoding + is used to substitute space. Ensure you do not get " 45 1234 5678" in fact.

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
1

When a URL is encoded the + sign indicates a space so your function unescape_html() is removing the + sign

For example:

http://www.example.com/?text=A+blue+sky&something_else=A+red+sky
ajtrichards
  • 29,723
  • 13
  • 94
  • 101