Skip to content

Commit b7f0f05

Browse files
committed
Added global and insensitive flags to url regex pattern
1 parent c91cfb7 commit b7f0f05

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

csp/sync.csp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,8 @@
147147
&js<
148148
var outputContainer = document.getElementById('outputBox');
149149
var lineText = #(..QuoteJS(escapedLine))#;
150-
var urlRegex = /(https?:\/\/[^ ]*)/;
150+
var urlRegex = /(https?:\/\/[^ ]*)/gi;
151151
lineText = lineText.replace(urlRegex, "<a href='$1' target=_blank>$1</a>");
152-
var lineTextNode = document.createTextNode(lineText);
153152
outputContainer.innerHTML += lineText + "<br>";
154153
>
155154
}

0 commit comments

Comments
 (0)