|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57412 Escaped chars not unescaped
Submitted: 2006-12-01 13:13 UTC Modified: 2008-12-18 21:35 UTC
From: jan at horde dot org Assigned:
Status: Not a bug Package: json (PECL)
PHP Version: 5_2 CVS-2006-12-01 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jan at horde dot org
New email:
PHP Version: OS:


 [2006-12-01 13:13 UTC] jan at horde dot org
json_decode() doesn't unescaped escaped characters like tabs, newlines, carriage returns etc. and doesn't understand single quotes.
A patch for 001.phpt (PHP_5_2 branch) is available at

Reproduce code:

Expected result:
string(13) "hello	"world""
string(4) "blah"

Actual result:
string(16) "hello\t\"world\""
string(6) "'blah'"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-18 21:35 UTC]
The first one works correctly in 5.2.6 but the second is not 
valid JSON, it should be
"'blah'" or "blah"
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 13 07:01:28 2024 UTC