Skip to content

Commit 6bd1e50

Browse files
[EngCom] Public Pull Requests - 2.3-develop
- merged latest code from mainline branch
2 parents c3ef7b0 + 5a186a3 commit 6bd1e50

File tree

6 files changed

+42
-15
lines changed

6 files changed

+42
-15
lines changed

app/code/Magento/Customer/view/frontend/templates/account/link/authorization.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if ($block->isLoggedIn()) {
1313
$dataPostParam = sprintf(" data-post='%s'", $block->getPostParams());
1414
}
1515
?>
16-
<li class="authorization-link" data-label="<?= $block->escapeHtmlAttr(__('or')) ?>">
16+
<li class="authorization-link" data-label="<?= $block->escapeHtml(__('or')) ?>">
1717
<a <?= /* @noEscape */ $block->getLinkAttributes() ?><?= /* @noEscape */ $dataPostParam ?>>
1818
<?= $block->escapeHtml($block->getLabel()) ?>
1919
</a>

app/code/Magento/Customer/view/frontend/templates/form/login.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
id="login-form"
2020
data-mage-init='{"validation":{}}'>
2121
<?= $block->getBlockHtml('formkey') ?>
22-
<fieldset class="fieldset login" data-hasrequired="<?= $block->escapeHtmlAttr(__('* Required Fields')) ?>">
22+
<fieldset class="fieldset login" data-hasrequired="<?= $block->escapeHtml(__('* Required Fields')) ?>">
2323
<div class="field note"><?= $block->escapeHtml(__('If you have an account, sign in with your email address.')) ?></div>
2424
<div class="field email required">
2525
<label class="label" for="email"><span><?= $block->escapeHtml(__('Email')) ?></span></label>

app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
<label class="label" for="newsletter"><span><?= $block->escapeHtml(__('Sign Up for Our Newsletter:')) ?></span></label>
2323
<div class="control">
2424
<input name="email" type="email" id="newsletter"
25-
placeholder="<?= $block->escapeHtmlAttr(__('Enter your email address')) ?>"
26-
data-mage-init='{"mage/trim-input":{}}'
27-
data-validate="{required:true, 'validate-email':true}"/>
25+
placeholder="<?= $block->escapeHtml(__('Enter your email address')) ?>"
26+
data-mage-init='{"mage/trim-input":{}}'
27+
data-validate="{required:true, 'validate-email':true}"/>
2828
</div>
2929
</div>
3030
<div class="actions">

app/code/Magento/Sales/view/adminhtml/templates/order/totalbar.phtml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66

77
// @codingStandardsIgnoreFile
88

9+
$totals = $block->getTotals();
910
?>
10-
<?php if (sizeof($block->getTotals()) > 0): ?>
11+
<?php if ($totals && count($totals) > 0): ?>
1112
<table class="items-to-invoice">
1213
<tr>
13-
<?php foreach ($block->getTotals() as $_total): ?>
14-
<td <?php if ($_total['grand']): ?>class="grand-total"<?php endif; ?>>
15-
<?= /* @escapeNotVerified */ $_total['label'] ?><br />
16-
<?= /* @escapeNotVerified */ $_total['value'] ?>
14+
<?php foreach ($totals as $total): ?>
15+
<td <?php if ($total['grand']): ?>class="grand-total"<?php endif; ?>>
16+
<?= $block->escapeHtml($total['label']) ?><br />
17+
<?= $block->escapeHtml($total['value']) ?>
1718
</td>
1819
<?php endforeach; ?>
1920
</tr>

app/code/Magento/Ui/Model/Export/MetadataProvider.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ public function getHeaders(UiComponentInterface $component)
118118
foreach ($this->getColumns($component) as $column) {
119119
$row[] = $column->getData('config/label');
120120
}
121+
122+
array_walk($row, function (&$header) {
123+
if (mb_strpos($header, 'ID') === 0) {
124+
$header = '"' . $header . '"';
125+
}
126+
});
127+
121128
return $row;
122129
}
123130

app/code/Magento/Ui/Test/Unit/Model/Export/MetadataProviderTest.php

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,37 @@ protected function setUp()
4040
);
4141
}
4242

43-
public function testGetHeaders()
43+
/**
44+
* @param array $columnLabels
45+
* @param array $expected
46+
* @return void
47+
* @dataProvider getColumnsDataProvider
48+
*/
49+
public function testGetHeaders(array $columnLabels, array $expected): void
4450
{
4551
$componentName = 'component_name';
4652
$columnName = 'column_name';
47-
$columnLabel = 'column_label';
48-
49-
$component = $this->prepareColumns($componentName, $columnName, $columnLabel);
5053

54+
$component = $this->prepareColumns($componentName, $columnName, $columnLabels[0]);
5155
$result = $this->model->getHeaders($component);
5256
$this->assertTrue(is_array($result));
5357
$this->assertCount(1, $result);
54-
$this->assertEquals($columnLabel, $result[0]);
58+
$this->assertEquals($expected, $result);
59+
}
60+
61+
/**
62+
* @return array
63+
*/
64+
public function getColumnsDataProvider(): array
65+
{
66+
return [
67+
[['ID'],['"ID"']],
68+
[['Name'],['Name']],
69+
[['Id'],['Id']],
70+
[['id'],['id']],
71+
[['IDTEST'],['"IDTEST"']],
72+
[['ID TEST'],['"ID TEST"']],
73+
];
5574
}
5675

5776
public function testGetFields()

0 commit comments

Comments
 (0)