Skip to content

Commit 4366089

Browse files
authored
Merge pull request #25 from Angular-Wave/alert-autofix-451
Potential fix for code scanning alert no. 451: Inefficient regular expression
2 parents 25aa11c + 58065f8 commit 4366089

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/router/url/url-matcher.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export class UrlMatcher {
209209
const placeholder =
210210
/([:*])([\w[\]]+)|\{([\w[\]]+)(?::\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g;
211211
const searchPlaceholder =
212-
/([:]?)([\w[\].-]+)|\{([\w[\].-]+)(?::\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g;
212+
/([:]?)([\w[\].-]+)|\{([\w[\].-]+)(?::\s*((?:[^{\\}]+|\\.|{(?:[^{\\}]+|\\.)*})+))?\}/g;
213213
const patterns = [];
214214
let last = 0;
215215
let matchArray;

0 commit comments

Comments
 (0)