From c4503978ac4bed09b777df2f3afc09aa30dc34cd Mon Sep 17 00:00:00 2001 From: Konstantin Dinev Date: Tue, 5 Nov 2024 16:06:27 +0200 Subject: [PATCH] Fix code scanning alert no. 329: 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 7da3a88a6..36a862d81 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+((?:[^\s{}])+(\.|\s)?(?:[^\s{}])*)+\}\}/, + nonEncodeSub: /\{\{html\s+([^\s{}]+(\.|\s)?[^\s{}]*)+\}\}/, forSub: /\$\{(([\w\$]+\.[\w\$]*)+)\}/, arg: /args\[\d+\](?!.*\+)/, /* type="RegExp" Matches any block directive in the template