From 6aacf7320c789487b749e7b7c6a0da32daf0329a Mon Sep 17 00:00:00 2001 From: Rowan Hogan Date: Sun, 2 Apr 2023 14:20:30 +1000 Subject: [PATCH] Strip tags from page document title --- src/components/page/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/page/index.js b/src/components/page/index.js index d8631ff..9166a91 100644 --- a/src/components/page/index.js +++ b/src/components/page/index.js @@ -43,7 +43,7 @@ class Page extends Component { return Promise.resolve() .then(() => pageIsCached ? pages[title] : fetchPage(title)) .then(page => { - document.title = `${page.title} - Wikipadia` + document.title = `${page.title.replace(/(<([^>]+)>)/gi, "")} - Wikipadia`; storePage(title, page) this.setState(