Strip HTML tags from ToC element with regex before showing in title bar (#1120)

This commit is contained in:
Andrew Lloyd Cartwright
2020-06-21 17:28:18 -05:00
committed by Matthew Peveler
parent 06478b9273
commit f390aba9a2

View File

@@ -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;
}