From 20ce7adaf00278cd76cb1ffa9b62fe39fe9305d0 Mon Sep 17 00:00:00 2001 From: Claire Nord Date: Mon, 6 Mar 2023 22:47:41 -0800 Subject: [PATCH] feat(src content-script): remove HTML tags from answers --- src/content-script.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/content-script.ts b/src/content-script.ts index 2430282..a3a23e7 100644 --- a/src/content-script.ts +++ b/src/content-script.ts @@ -155,7 +155,9 @@ class FinalRoundParser { const categoryDiv = roundDiv.querySelector(".category"); const mouseOverDiv = categoryDiv?.children[0]; - this.answer = parseCorrectResponse(mouseOverDiv, "final jeopardy"); + const answerHtml = parseCorrectResponse(mouseOverDiv, "final jeopardy"); + // Remove HTML tags from the answer + this.answer = answerHtml.replace(/<[^>]*>/g, ""); } jsonify() {