From 5117d6dbad8b656bff61ce85a4615a96b464ec17 Mon Sep 17 00:00:00 2001 From: Julian Speckmann <176780813+KingIronMan2011@users.noreply.github.com> Date: Wed, 24 Dec 2025 04:08:21 +0100 Subject: [PATCH] fix: improve description handling in renderHTML method --- server/model/status_page.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server/model/status_page.js b/server/model/status_page.js index 22444112..cee06406 100644 --- a/server/model/status_page.js +++ b/server/model/status_page.js @@ -102,10 +102,9 @@ class StatusPage extends BeanModel { static async renderHTML(indexHTML, statusPage) { const $ = cheerio.load(indexHTML); - const description155 = marked(statusPage.description ?? "") - .replace(/<[^>]+>/gm, "") - .trim() - .substring(0, 155); + const rawDescription = statusPage.description ?? ""; + const descriptionText = rawDescription.replace(/<[^>]*>/g, ""); + const description155 = descriptionText.trim().substring(0, 155); $("title").text(statusPage.title); $("meta[name=description]").attr("content", description155);