Skip to content

Commit

Permalink
Merge pull request #1600 from magento-engcom/develop-prs
Browse files Browse the repository at this point in the history
[EngCom] Public Pull Requests - develop
  • Loading branch information
vrann authored Oct 19, 2017
2 parents 0c846b5 + 60ee509 commit e7c5bb5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 17 deletions.
27 changes: 13 additions & 14 deletions app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,20 +168,19 @@ protected function getFieldConfig(

$element = [
'component' => isset($additionalConfig['component']) ? $additionalConfig['component'] : $uiComponent,
'config' => [
// customScope is used to group elements within a single form (e.g. they can be validated separately)
'customScope' => $dataScopePrefix,
'customEntry' => isset($additionalConfig['config']['customEntry'])
? $additionalConfig['config']['customEntry']
: null,
'template' => 'ui/form/field',
'elementTmpl' => isset($additionalConfig['config']['elementTmpl'])
? $additionalConfig['config']['elementTmpl']
: $elementTemplate,
'tooltip' => isset($additionalConfig['config']['tooltip'])
? $additionalConfig['config']['tooltip']
: null
],
'config' => $this->mergeConfigurationNode(
'config',
$additionalConfig,
[
'config' => [
// customScope is used to group elements within a single
// form (e.g. they can be validated separately)
'customScope' => $dataScopePrefix,
'template' => 'ui/form/field',
'elementTmpl' => $elementTemplate,
],
]
),
'dataScope' => $dataScopePrefix . '.' . $attributeCode,
'label' => $attributeConfig['label'],
'provider' => $providerName,
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Store/etc/frontend/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<item name="standard" xsi:type="array">
<item name="class" xsi:type="string">Magento\Framework\App\Router\Base</item>
<item name="disable" xsi:type="boolean">false</item>
<item name="sortOrder" xsi:type="string">20</item>
<item name="sortOrder" xsi:type="string">30</item>
</item>
<item name="default" xsi:type="array">
<item name="class" xsi:type="string">Magento\Framework\App\Router\DefaultRouter</item>
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/UrlRewrite/etc/frontend/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<item name="urlrewrite" xsi:type="array">
<item name="class" xsi:type="string">Magento\UrlRewrite\Controller\Router</item>
<item name="disable" xsi:type="boolean">false</item>
<item name="sortOrder" xsi:type="string">40</item>
<item name="sortOrder" xsi:type="string">20</item>
</item>
</argument>
</arguments>
Expand Down
6 changes: 5 additions & 1 deletion lib/web/mage/utils/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ define([
* @returns {Boolean}
*/
function isTemplate(value) {
return typeof value === 'string' && ~value.indexOf(opener);
return typeof value === 'string' &&
value.indexOf(opener) !== -1 &&
// the below pattern almost always indicates an accident which should not cause template evaluation
// refuse to evaluate
value.indexOf('${{') === -1;
}

/**
Expand Down

0 comments on commit e7c5bb5

Please sign in to comment.