summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
Diffstat (limited to 'server.js')
-rw-r--r--server.js2
1 files changed, 1 insertions, 1 deletions
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, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
- text = text.replace(/https?:\/\/\S+/, (match) => {
+ text = text.replace(/https?:\/\/\S+/g, (match) => {
if (match.endsWith(".jpg") || match.endsWith(".png") || match.endsWith(".svg"))
return `<a href="${match}"><img src="${match}"></a>`;
return `<a href="${match}">${match}</a>`;