Skip to content

Commit 7f5c41a

Browse files
committed
MAGETWO-81329: Escape $ in cms page/static block content #11315
- Merge Pull Request #11315 from slackerzz/magento2:fix_issue_10501 - Merged commits: 1. bac9576
2 parents 0c846b5 + bac9576 commit 7f5c41a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/web/mage/utils/template.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ define([
7676
* @returns {Boolean}
7777
*/
7878
function isTemplate(value) {
79-
return typeof value === 'string' && ~value.indexOf(opener);
79+
return typeof value === 'string' &&
80+
value.indexOf(opener) !== -1 &&
81+
// the below pattern almost always indicates an accident which should not cause template evaluation
82+
// refuse to evaluate
83+
value.indexOf('${{') === -1;
8084
}
8185

8286
/**

0 commit comments

Comments
 (0)