Skip to content

Commit bac9576

Browse files
committed
Fix issue 10501
1 parent e0e5a93 commit bac9576

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)