Skip to content

Commit

Permalink
Merge pull request #2271 from IgniteUI/alert-autofix-5
Browse files Browse the repository at this point in the history
Fix code scanning alert no. 5: Incomplete string escaping or encoding
  • Loading branch information
ChronosSF authored Nov 15, 2024
2 parents da1793f + 95d8cba commit 92050fe
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/js/modules/infragistics.templating.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,9 @@
splitName = tempToken[ 1 ].split(".");

// K.D. September 25th, 2012 Bug #122463 The property can contain $ in its name.
template = template.replace(new RegExp("\\$\\{" + tempToken[ 1 ].replace(/\$/g, "\\$") + "\\}", "g"), "");
tempToken[ 3 ] = new RegExp("\\$\\{" + tempToken[ 1 ].replace(/\$/g, "\\$") + "\\}", "g");
tempToken[ 1 ] = tempToken[ 1 ].replace(/\\/g, "\\\\").replace(/\$/g, "\\$");
template = template.replace(new RegExp("\\$\\{" + tempToken[ 1 ] + "\\}", "g"), "");
tempToken[ 3 ] = new RegExp("\\$\\{" + tempToken[ 1 ] + "\\}", "g");
tempToken[ 1 ] = splitName;
tempToken[ 2 ] = true;
this.tokens.push(tempToken);
Expand All @@ -200,8 +201,9 @@
splitName = tempToken[ 1 ].split(".");

// K.D. September 25th, 2012 Bug #122463 The property can contain $ in its name.
template = template.replace(new RegExp("\\{\\{html\\s+" + tempToken[ 1 ].replace(/\$/g, "\\$") + "\\}\\}", "g"), "");
tempToken[ 3 ] = new RegExp("\\{\\{html\\s+" + tempToken[ 1 ].replace(/\$/g, "\\$") + "\\}\\}", "g");
tempToken[ 1 ] = tempToken[ 1 ].replace(/\\/g, "\\\\").replace(/\$/g, "\\$");
template = template.replace(new RegExp("\\{\\{html\\s+" + tempToken[ 1 ] + "\\}\\}", "g"), "");
tempToken[ 3 ] = new RegExp("\\{\\{html\\s+" + tempToken[ 1 ] + "\\}\\}", "g");
tempToken[ 1 ] = splitName;
tempToken[ 2 ] = false;
this.tokens.push(tempToken);
Expand Down

0 comments on commit 92050fe

Please sign in to comment.