From 9f7597754a09e55bf5f5ecb4fc16f9b2d01c7cd8 Mon Sep 17 00:00:00 2001 From: Atsushi Matsuo Date: Wed, 19 Jun 2024 18:21:39 +0900 Subject: [PATCH] Fix not rendering correctly in some cases (#658) --- src/DebugBar/JavascriptRenderer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DebugBar/JavascriptRenderer.php b/src/DebugBar/JavascriptRenderer.php index 28b0658..41c17c5 100644 --- a/src/DebugBar/JavascriptRenderer.php +++ b/src/DebugBar/JavascriptRenderer.php @@ -1212,7 +1212,7 @@ class JavascriptRenderer { $js = sprintf("%s.addDataSet(%s, \"%s\"%s);\n", $this->variableName, - json_encode($data), + json_encode($data, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP | JSON_INVALID_UTF8_IGNORE), $requestId, $suffix ? ", " . json_encode($suffix) : '' );