From 5dd784e4b743efe2a9289c981fd185614ca9c13b Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sat, 8 Jun 2024 07:08:43 +0200 Subject: [PATCH] Add global flag to a regular expression --- cronjob/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cronjob/main.js b/cronjob/main.js index 469115e..33e83c4 100644 --- a/cronjob/main.js +++ b/cronjob/main.js @@ -92,7 +92,7 @@ https.get("https://blog.svrjs.org/atom.xml", function (res) { var imageURL = "https://blog.svrjs.org/images/covers/" + (qim ? qim[1] : "missing") + ".png"; formatTemplate("index.html", { "title": antiXSS(ent[_qid].title), - "summary": ent[_qid].summary.replace(/ (src|href)="\/(?!\/)/," $1=\"https://blog.svrjs.org/"), + "summary": ent[_qid].summary.replace(/ (src|href)="\/(?!\/)/g," $1=\"https://blog.svrjs.org/"), "image": antiXSS(imageURL), "link": antiXSS(ent[_qid].id), "unsubscribe": antiXSS("https://newsletter.svrjs.org/unsubscribe.svr?id=" + encodeURIComponent(emails[_id].unsubscribeId))