Skip to content

Commit 8d8d392

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-49512' into BUGS
2 parents 60719a8 + 545f827 commit 8d8d392

File tree

3 files changed

+8
-18
lines changed

3 files changed

+8
-18
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -603,12 +603,13 @@ private function _otherText()
603603
while (preg_match('#' . self::REGEXP_TOKEN . '#', $this->_content, $matches, PREG_OFFSET_CAPTURE, $next)) {
604604
$translateProperties = json_encode(
605605
[
606-
'shown' => htmlspecialchars($matches[1][0]),
607-
'translated' => htmlspecialchars($matches[2][0]),
606+
'shown' => $matches[1][0],
607+
'translated' => $matches[2][0],
608608
'original' => $matches[3][0],
609609
'location' => 'Text',
610-
'scope' => htmlspecialchars($matches[4][0]),
611-
]
610+
'scope' => $matches[4][0],
611+
],
612+
JSON_HEX_QUOT
612613
);
613614

614615
$spanHtml = $this->_getDataTranslateSpan(

app/code/Magento/Wishlist/view/frontend/templates/messages/addProductSuccessMessage.phtml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,4 @@
77
/** @var \Magento\Framework\View\Element\Template $block */
88
?>
99

10-
<?php
11-
echo $block
12-
->escapeHtml(
13-
$block->getData('product_name')
14-
)
15-
?> has been added to your Wish List. Click <a href="<?php
16-
echo $block
17-
->escapeUrl(
18-
$block->getData('referer')
19-
)
20-
?>">here</a> to continue shopping.
10+
<?php /* @escapeVerified */ echo __('%1 has been added to your Wish List.', $block->escapeHtml($block->getData('product_name'))) ?> <?php /* @escapeNotVerified */ echo __('Click <a href="%1">here</a> to continue shopping.', $block->escapeUrl($block->getData('referer')));

lib/internal/Magento/Framework/Json/Encoder.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ public function __construct(\Magento\Framework\Translate\InlineInterface $transl
3030
*/
3131
public function encode($data)
3232
{
33-
$json = \Zend_Json::encode($data);
34-
$this->translateInline->processResponseBody($json, true);
35-
return $json;
33+
$this->translateInline->processResponseBody($data);
34+
return \Zend_Json::encode($data);
3635
}
3736
}

0 commit comments

Comments
 (0)