Skip to content

Commit 55d79d4

Browse files
committed
fix: fix parsing some URLs that would contain new lines
1 parent 790fd0d commit 55d79d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

background/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ export const sleep = (ms) => {
270270
*/
271271
const $a = document.createElement('a');
272272
export const embedLinks = (str) => {
273-
return str.replace(/(href=")?(https?:\/\/[^"'()[\]{} ]+)/g, (m, p1, url) => {
273+
return str.replace(/(href=")?(https?:\/\/[^"'()[\]{} \n]+)/g, (m, p1, url) => {
274274
if (p1) return m;
275275
$a.href = url;
276276
$a.target = '_blank';

0 commit comments

Comments
 (0)