Skip to content

Commit ce69e05

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

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

app/code/Magento/Theme/Block/Html/Header.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public function getWelcome()
3434
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
3535
);
3636
}
37+
$this->_data['welcome'] = str_replace("'", "\'", $this->_data['welcome']);
3738
return __($this->_data['welcome']);
3839
}
3940
}

app/code/Magento/Theme/view/frontend/templates/html/header.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ $welcomeMessage = $block->getWelcome();
2020
<!-- /ko -->
2121
<!-- ko ifnot: customer().fullname -->
2222
<span class="not-logged-in"
23-
data-bind='text: "<?= $escaper->escapeHtml($welcomeMessage) ?>"'></span>
23+
data-bind="text: '<?= $escaper->escapeHtml($welcomeMessage) ?>'"></span>
2424
<?= $block->getBlockHtml('header.additional') ?>
2525
<!-- /ko -->
2626
</li>

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,6 @@ private function _otherText()
677677
{
678678
$next = 0;
679679
$matches = [];
680-
$isJson = $this->_isJson;
681680
while (preg_match('#' . self::REGEXP_TOKEN . '#', $this->_content, $matches, PREG_OFFSET_CAPTURE, $next)) {
682681
$translateProperties = json_encode(
683682
[
@@ -689,15 +688,13 @@ private function _otherText()
689688
],
690689
JSON_HEX_QUOT
691690
);
692-
$this->_isJson = true;
693691
$spanHtml = $this->_getDataTranslateSpan(
694692
'[' . $this->escaper->escapeHtmlAttr($translateProperties) . ']',
695693
$matches[1][0]
696694
);
697695
$this->_content = substr_replace($this->_content, $spanHtml, $matches[0][1], strlen($matches[0][0]));
698696
$next = $matches[0][1] + strlen($spanHtml) - 1;
699697
}
700-
$this->_isJson = $isJson;
701698
}
702699

703700
/**

0 commit comments

Comments
 (0)