Skip to content

Commit

Permalink
Strip HTML tags from ToC element with regex before showing in title b…
Browse files Browse the repository at this point in the history
…ar (#1120)
  • Loading branch information
atlc authored and MasterOdin committed Jun 22, 2020
1 parent 06478b9 commit f390aba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/javascripts/app/_toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@
if (window.history.replaceState) {
window.history.replaceState(null, "", best);
}
var thisTitle = $best.data("title")
var thisTitle = $best.data("title");
if (thisTitle !== undefined && thisTitle.length > 0) {
document.title = thisTitle + " – " + originalTitle;
document.title = thisTitle.replace(htmlPattern, "") + " – " + originalTitle;
} else {
document.title = originalTitle;
}
Expand Down

0 comments on commit f390aba

Please sign in to comment.