note 100679 added to function.json-encode
| From: | php at ianco dot co dot uk | Date: | Fri, 29 Oct 2010 23:02:17 +0000 |
| Subject: | note 100679 added to function.json-encode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-173601@lists.php.net to get a copy of this message | ||
Note that json_encode always escapes a solidus (forward slash, %x2F).
This may be a problem if you are encoding a URL.
It's been recognised and fixed in September 2010:
http://bugs.php.net/bug.php?id=49366
But escaping will still be the default behaviour.
A crude repair can be done with
str_replace('\\/', '/', $jsonEncoded)
----
Server IP: 87.124.126.137
Probable Submitter: 84.92.139.196 (proxied: 84.92.139.196)
----
Manual Page -- http://www.php.net/manual/en/function.json-encode.php
Edit -- https://master.php.net/note/edit/100679
Del: integrated -- https://master.php.net/note/delete/100679/integrated
Del: useless -- https://master.php.net/note/delete/100679/useless
Del: bad code -- https://master.php.net/note/delete/100679/bad+code
Del: spam -- https://master.php.net/note/delete/100679/spam
Del: non-english -- https://master.php.net/note/delete/100679/non-english
Del: in docs -- https://master.php.net/note/delete/100679/in+docs
Del: other reasons-- https://master.php.net/note/delete/100679
Reject -- https://master.php.net/note/reject/100679
Search -- https://master.php.net/manage/user-notes.php