From d7d35fdec6d0f0e5e0011718768756e13cc6826e Mon Sep 17 00:00:00 2001 From: Ryan Clayton Date: Tue, 23 May 2023 14:45:12 -0600 Subject: [PATCH] MWPW-129907 Blog Tags This fixes a bug where Blog tags were getting stripped down to the point they no longer matched what was listed in the related taxonomy file. Causing tags to not render on the page. Resolves: MWPW-129907 --- libs/blocks/tags/tags.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/blocks/tags/tags.js b/libs/blocks/tags/tags.js index 5b89c31219..6c10e9de4d 100644 --- a/libs/blocks/tags/tags.js +++ b/libs/blocks/tags/tags.js @@ -2,7 +2,7 @@ import { getTaxonomyModule, loadTaxonomy, computeTaxonomyFromTopics, getLinkForT import { createTag } from '../../utils/utils.js'; export default async function init(blockEl) { - let tags = blockEl.firstElementChild?.firstElementChild?.textContent; + const tags = blockEl.firstElementChild?.firstElementChild?.textContent; if (!tags) return; @@ -11,7 +11,6 @@ export default async function init(blockEl) { } blockEl.innerHTML = ''; - tags = tags.replace(/[^a-zA-Z0-9,\s-]/g, ''); const tagsArray = tags.split(', ').map((tag) => tag.trim()); const articleTax = computeTaxonomyFromTopics(tagsArray); const tagsWrapper = createTag('p');