Skip to content

Commit 4f7b01a

Browse files
author
Natalia Momotenko
committed
Merge remote-tracking branch 'origin/develop' into MAGETWO-55217-new
2 parents 905f66e + 8add899 commit 4f7b01a

File tree

86 files changed

+2785
-343
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+2785
-343
lines changed

app/code/Magento/AdvancedPricingImportExport/Model/Export/AdvancedPricing.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,8 @@ protected function _getWebsiteCode($websiteId)
395395
{
396396
$storeName = ($websiteId == 0)
397397
? ImportAdvancedPricing::VALUE_ALL_WEBSITES
398-
: $this->_storeManager->getWebsite($websiteId)->getName();
398+
: $this->_storeManager->getWebsite($websiteId)->getCode();
399+
$currencyCode = '';
399400
if ($websiteId == 0) {
400401
$currencyCode = $this->_storeManager->getWebsite($websiteId)->getBaseCurrencyCode();
401402
}

app/code/Magento/Backend/Block/Widget/Button.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ protected function _attributesToHtml($attributes)
113113
if ($attributeValue === null || $attributeValue == '') {
114114
continue;
115115
}
116-
$html .= $attributeKey . '="' . $this->escapeHtml($attributeValue) . '" ';
116+
$html .= $attributeKey . '="' . $this->escapeHtmlAttr($attributeValue, false) . '" ';
117117
}
118118

119119
return $html;

app/code/Magento/Backend/Block/Widget/Button/SplitButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ protected function _getAttributesString($attributes)
229229
if ($attributeValue === null || $attributeValue == '') {
230230
continue;
231231
}
232-
$html[] = $attributeKey . '="' . $this->escapeHtml($attributeValue) . '"';
232+
$html[] = $attributeKey . '="' . $this->escapeHtmlAttr($attributeValue, false) . '"';
233233
}
234234
return join(' ', $html);
235235
}

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ protected function _toOptionHtml($action, \Magento\Framework\DataObject $row)
8282
$actionCaption = '';
8383
$this->_transformActionData($action, $actionCaption, $row);
8484

85-
$htmlAttributes = ['value' => $this->escapeHtml($this->_jsonEncoder->encode($action))];
85+
$htmlAttributes = [
86+
'value' => $this->escapeHtmlAttr($this->_jsonEncoder->encode($action), false)
87+
];
8688
$actionAttributes->setData($htmlAttributes);
8789
return '<option ' . $actionAttributes->serialize() . '>' . $actionCaption . '</option>';
8890
}

app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected function _construct()
5454
{
5555
parent::_construct();
5656

57-
$this->setErrorText($this->escapeJsQuote(__('Please select items.')));
57+
$this->setErrorText($this->escapeHtml(__('Please select items.')));
5858

5959
if (null !== $this->getOptions()) {
6060
foreach ($this->getOptions() as $optionId => $option) {

app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function __construct(
6666
public function _construct()
6767
{
6868
parent::_construct();
69-
$this->setErrorText($this->escapeJsQuote(__('Please select items.')));
69+
$this->setErrorText($this->escapeHtml(__('Please select items.')));
7070
}
7171

7272
/**

app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class="search-global-input"
1818
id="search-global"
1919
name="query"
20-
data-mage-init='<?php echo $block->escapeHtml($this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getWidgetInitOptions()))?>'>
20+
data-mage-init='<?php /* @noEscape */ echo $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getWidgetInitOptions()) ?>'>
2121
<button
2222
type="submit"
2323
class="search-global-action"

app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ require([
147147

148148
//<![CDATA[
149149
backup = new AdminBackup();
150-
backup.rollbackUrl = '<?php /* @escapeNotVerified */ echo $block->escapeJsQuote($rollbackUrl);?>';
151-
backup.backupUrl = '<?php /* @escapeNotVerified */ echo $block->escapeJsQuote($backupUrl);?>';
150+
backup.rollbackUrl = '<?php echo $block->escapeUrl($rollbackUrl); ?>';
151+
backup.backupUrl = '<?php echo $block->escapeUrl($backupUrl); ?>';
152152
//]]>
153153

154154
});

app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ protected function _prepareLayout()
127127
'Magento\Backend\Block\Widget\Button',
128128
[
129129
'label' => __('Delete'),
130-
'onclick' => 'deleteConfirm(\'' . $this->escapeJsQuote(
130+
'onclick' => 'deleteConfirm(\'' . $this->escapeJs(
131131
__(
132132
'You are about to delete all products in this attribute set. '
133133
. 'Are you sure you want to do that?'

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214

215215
if( editSet.SystemNodesExists(editSet.currentNode) ) {
216216
alert({
217-
content: '<?php /* @escapeNotVerified */ echo $block->escapeJsQuote(__('This group contains system attributes. Please move system attributes to another group and try again.')) ?>'
217+
content: '<?php echo $block->escapeJs(__('This group contains system attributes. Please move system attributes to another group and try again.')) ?>'
218218
});
219219
return;
220220
}
@@ -343,7 +343,7 @@
343343

344344
failure : function(o) {
345345
alert({
346-
content: '<?php /* @escapeNotVerified */ echo $block->escapeJsQuote(__('Sorry, we\'re unable to complete this request.')) ?>'
346+
content: '<?php echo $block->escapeJs(__('Sorry, we\'re unable to complete this request.')) ?>'
347347
});
348348
},
349349

@@ -360,7 +360,7 @@
360360
rightBeforeAppend : function(tree, nodeThis, node, newParent) {
361361
if (node.attributes.is_user_defined == 0) {
362362
alert({
363-
content: '<?php /* @escapeNotVerified */ echo $block->escapeJsQuote(__('You can\'t remove attributes from this attribute set.')) ?>'
363+
content: '<?php echo $block->escapeJs(__('You can\'t remove attributes from this attribute set.')) ?>'
364364
});
365365
return false;
366366
} else {
@@ -376,7 +376,7 @@
376376

377377
if (node.attributes.is_unassignable == 0) {
378378
alert({
379-
content: '<?php /* @escapeNotVerified */ echo $block->escapeJsQuote(__('You can\'t remove attributes from this attribute set.')) ?>'
379+
content: '<?php echo $block->escapeJs(__('You can\'t remove attributes from this attribute set.')) ?>'
380380
});
381381
return false;
382382
} else {

0 commit comments

Comments
 (0)