Skip to content

Commit 999c7f4

Browse files
committed
PR-34061 Fixed functional tests failure
1 parent 20e39cf commit 999c7f4

File tree

1 file changed

+3
-1
lines changed
  • app/code/Magento/Translation/Model/Inline

1 file changed

+3
-1
lines changed

app/code/Magento/Translation/Model/Inline/Parser.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,7 @@ private function _otherText()
677677
{
678678
$next = 0;
679679
$matches = [];
680+
$isJson = $this->_isJson;
680681
while (preg_match('#' . self::REGEXP_TOKEN . '#', $this->_content, $matches, PREG_OFFSET_CAPTURE, $next)) {
681682
$translateProperties = json_encode(
682683
[
@@ -688,14 +689,15 @@ private function _otherText()
688689
],
689690
JSON_HEX_QUOT
690691
);
691-
692+
$this->_isJson = true;
692693
$spanHtml = $this->_getDataTranslateSpan(
693694
'[' . $this->escaper->escapeHtmlAttr($translateProperties) . ']',
694695
$matches[1][0]
695696
);
696697
$this->_content = substr_replace($this->_content, $spanHtml, $matches[0][1], strlen($matches[0][0]));
697698
$next = $matches[0][1] + strlen($spanHtml) - 1;
698699
}
700+
$this->_isJson = $isJson;
699701
}
700702

701703
/**

0 commit comments

Comments
 (0)