From 562b9bb88d78e59b21c0eddd2d28bfb578401ef8 Mon Sep 17 00:00:00 2001 From: Konstantin Dinev Date: Mon, 4 Nov 2024 16:23:51 +0200 Subject: [PATCH 1/6] Fix code scanning alert no. 27: 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 c2734ba53..7da3a88a6 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+((?:[^\s{}])+(\.|\s)?(?:[^\s{}])*)+\}\}/, forSub: /\$\{(([\w\$]+\.[\w\$]*)+)\}/, arg: /args\[\d+\](?!.*\+)/, /* type="RegExp" Matches any block directive in the template From c4503978ac4bed09b777df2f3afc09aa30dc34cd Mon Sep 17 00:00:00 2001 From: Konstantin Dinev Date: Tue, 5 Nov 2024 16:06:27 +0200 Subject: [PATCH 2/6] 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 From 397477d3f5273acd71a2b9310f9064fefc758d01 Mon Sep 17 00:00:00 2001 From: Konstantin Dinev Date: Tue, 5 Nov 2024 16:27:11 +0200 Subject: [PATCH 3/6] Fix code scanning alert no. 330: 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 e65c959ac..d98222f04 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{}]+)*)\}\}/, forSub: /\$\{([\w\$]+\.[\w\$]+(?:\.[\w\$]+)*)\}/, arg: /args\[\d+\](?!.*\+)/, /* type="RegExp" Matches any block directive in the template From e864cc271925281fd0326a4702227465af8d5705 Mon Sep 17 00:00:00 2001 From: Konstantin Dinev Date: Tue, 5 Nov 2024 16:31:01 +0200 Subject: [PATCH 4/6] Fix code scanning alert no. 331: 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 d98222f04..48c595e6f 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{}]+)*)\}\}/, + nonEncodeSub: /\{\{html\s+([^\s{}]+(?:\.[^\s{}]+?)*)\}\}/, forSub: /\$\{([\w\$]+\.[\w\$]+(?:\.[\w\$]+)*)\}/, arg: /args\[\d+\](?!.*\+)/, /* type="RegExp" Matches any block directive in the template From 7566263eb92793a1dc1929566453337a975b70ec Mon Sep 17 00:00:00 2001 From: Konstantin Dinev Date: Tue, 5 Nov 2024 16:47:38 +0200 Subject: [PATCH 5/6] Fix code scanning alert no. 332: 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 48c595e6f..d98222f04 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{}]+?)*)\}\}/, + nonEncodeSub: /\{\{html\s+([^\s{}]+(?:\.[^\s{}]+)*)\}\}/, forSub: /\$\{([\w\$]+\.[\w\$]+(?:\.[\w\$]+)*)\}/, arg: /args\[\d+\](?!.*\+)/, /* type="RegExp" Matches any block directive in the template From a817c71f629e7a3501812e98a8e1052af2cbf934 Mon Sep 17 00:00:00 2001 From: Konstantin Dinev Date: Tue, 5 Nov 2024 16:55:20 +0200 Subject: [PATCH 6/6] Fix code scanning alert no. 331: 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 d98222f04..eb2a58b7e 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{}]+)*)\}\}/, + nonEncodeSub: /\{\{html\s+([^\s{}\.]+(?:\.[^\s{}\.]+)*)\}\}/, forSub: /\$\{([\w\$]+\.[\w\$]+(?:\.[\w\$]+)*)\}/, arg: /args\[\d+\](?!.*\+)/, /* type="RegExp" Matches any block directive in the template