Verified Commit 724134ee authored by Cyril Vazquez's avatar Cyril Vazquez
Browse files

Unescape

parent 68ff3d22
Pipeline #7133 canceled with stages
...@@ -305,9 +305,9 @@ class JsonTokenizer ...@@ -305,9 +305,9 @@ class JsonTokenizer
*/ */
protected function unescape($string) protected function unescape($string)
{ {
$escapers = array("\\", "/", "\"", "\n", "\r", "\t", "\x08", "\x0c"); $escaped = array('\\\\', '\\/', '\\"');//, "\\n", "\\r", "\\t", "\\f", "\\b");
$replacements = array("\\\\", "\\/", "\\\"", "\\n", "\\r", "\\t", "\\f", "\\b"); $unescaped = array('\\', '/', '"');//, "\n", "\r", "\t", "\x08", "\x0c");
$result = str_replace($replacements, $escapers, $string); $result = str_replace($escaped, $unescaped, $string);
return $result; return $result;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment