From f2f28d80de5ed8c3249b0fda6332de5231ef3733 Mon Sep 17 00:00:00 2001 From: Konstantin Dinev Date: Tue, 12 Nov 2024 11:50:35 +0200 Subject: [PATCH] Fix code scanning alert no. 328: Inefficient regular expression Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- src/js/modules/infragistics.templating.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/modules/infragistics.templating.js b/src/js/modules/infragistics.templating.js index 190cb7d53..984354492 100644 --- a/src/js/modules/infragistics.templating.js +++ b/src/js/modules/infragistics.templating.js @@ -126,7 +126,7 @@ /* type="RegExp" Matches any substitution element in the template that is to be rendered as it is Use $.ig.regExp.sub.exec(tmpl) in order to get the substitution element in the tmpl string */ - nonEncodeSub: /\{\{html\s+([\w\$\-]+(\.|\s)?[\w\$\-]*)+\}\}/, + nonEncodeSub: /\{\{html\s+((?:[\w\$-]+)(?:\.(?:[\w\$-]+)|\s(?:[\w\$-]+))*)\}\}/, forSub: /\$\{([\w\$]+\.[\w\$]+(?:\.[\w\$]+)*)\}/, arg: /args\[\d+\](?!.*\+)/, /* type="RegExp" Matches any block directive in the template