Skip to content

Commit 865d2af

Browse files
committed
Change data handling
1 parent 9135342 commit 865d2af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Compiler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,10 +538,10 @@ public function registerData(DOMElement $scriptElement): void
538538
} elseif ($quoteChar === $char && $lastChar !== '\\') {
539539
$quoteChar = null;
540540
}
541-
if ($char === '[' || $char === '{') {
541+
if (($char === '[' || $char === '{') && $quoteChar === null) {
542542
++$bracketOpenCount;
543543
$dataArray[$dataCount] .= $char;
544-
} elseif ($char === ']' || $char === '}') {
544+
} elseif (($char === ']' || $char === '}') && $quoteChar === null) {
545545
--$bracketOpenCount;
546546
$dataArray[$dataCount] .= $char;
547547
} elseif ($char === ',' && $bracketOpenCount === 0 && $quoteChar === null) {

0 commit comments

Comments
 (0)