Skip to content

Commit d723ab7

Browse files
author
Max Schaefer
committed
JavaScript: Fix getDelimiterMatchingRegexp to work on multi-line strings.
1 parent a487627 commit d723ab7

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

javascript/ql/src/semmle/javascript/frameworks/Templating.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ module Templating {
3737
* storing it in its first (and only) capture group.
3838
*/
3939
string getDelimiterMatchingRegexp() {
40-
result = ".*(" + concat("\\Q" + getADelimiter() + "\\E", "|") + ").*"
40+
result = "(?s).*(" + concat("\\Q" + getADelimiter() + "\\E", "|") + ").*"
4141
}
4242
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
config: |
2+
[mail]
3+
host = smtp.mydomain.com
4+
port = 25
5+
username = {{username}}
6+
password = {{pwd}}

0 commit comments

Comments
 (0)