From dadc4ca510d5e45e270faa04775f377d8ff40412 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 6 Apr 2022 23:03:25 +0000 Subject: Linkify all links in a post. --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server.js') diff --git a/server.js b/server.js index 4354d52..8b2a31d 100644 --- a/server.js +++ b/server.js @@ -742,7 +742,7 @@ function show_forum_page(req, res, page) { function linkify_post(text) { text = text.replace(/&/g, "&").replace(//g, ">"); - text = text.replace(/https?:\/\/\S+/, (match) => { + text = text.replace(/https?:\/\/\S+/g, (match) => { if (match.endsWith(".jpg") || match.endsWith(".png") || match.endsWith(".svg")) return ``; return `${match}`; -- cgit v1.2.3