Skip to content

Commit 24144f3

Browse files
MAGETWO-75309: Add escaping of js translation version #10904
2 parents aab5964 + 9918dd5 commit 24144f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/Translation/view/base/templates/translate.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
<?php $version = $block->getTranslationFileVersion(); ?>
3030

31-
if (versionObj.version !== '<?= /* @noEscape */ $version ?>') {
31+
if (versionObj.version !== '<?php $block->escapeJsQuote($version) ?>') {
3232
dependencies.push(
3333
'text!<?= /* @noEscape */ Magento\Translation\Model\Js\Config::DICTIONARY_FILE_NAME ?>'
3434
);
@@ -44,7 +44,7 @@
4444
$.localStorage.set(
4545
'mage-translation-file-version',
4646
{
47-
version: '<?= /* @noEscape */ $version ?>'
47+
version: '<?php $block->escapeJsQuote($version) ?>'
4848
}
4949
);
5050
} else {

0 commit comments

Comments
 (0)