Skip to content

Commit 60ee509

Browse files
authored
MAGETWO-81329: Escape $ in cms page/static block content #11315
2 parents 3f0a090 + 7f5c41a commit 60ee509

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)