Skip to content

Commit

Permalink
Strip tags from page document title
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanhogan committed Apr 2, 2023
1 parent e3b0835 commit 6aacf73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/page/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 6aacf73

Please sign in to comment.