From 7de9f17ec39ba759e9c335d5bf31a6ae703e835d Mon Sep 17 00:00:00 2001 From: Huda Joad Date: Mon, 4 Dec 2023 23:48:11 +0300 Subject: [PATCH] preserve body tag --- netlify/functions/handleMetadata.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netlify/functions/handleMetadata.js b/netlify/functions/handleMetadata.js index 6d95208..590e7d7 100644 --- a/netlify/functions/handleMetadata.js +++ b/netlify/functions/handleMetadata.js @@ -20,6 +20,9 @@ function simplifyContent(content) { // Preserve the title tag and its content let title = content.match(/(.*?)<\/title>/i); title = title ? title[1] : ''; + // Preserve the title tag and its content + let body = content.match(/(.*?)<\/body>/i); + body = body ? body[1] : ''; // Extract the body content, if present let bodyContent = '';