remove html tags from meta tags

This commit is contained in:
2023-10-10 10:17:39 +02:00
parent 2f47860046
commit 9c5bc00657
2 changed files with 11 additions and 3 deletions

View File

@@ -0,0 +1,7 @@
// Function to strip HTML tags from a string
function stripHtmlTags(input) {
const parser = new DOMParser();
const doc = parser.parseFromString(input, 'text/html');
const textContent = doc.body.textContent || "";
return textContent;
}