Strip HTML when setting the browser titlebar.

master v1.0
Pacman Ghost 2 years ago
parent 51ff9e960b
commit 32b3ebdf5e
  1. 4
      web/src/App.js

@ -563,6 +563,10 @@ export class App extends React.Component
this.setWindowTitle( null ) ;
}
setWindowTitle( caption ) {
if ( caption ) {
let doc = new DOMParser().parseFromString( caption, "text/html" ) ;
caption = doc.body.textContent ;
}
document.title = caption ? APP_NAME + " - " + caption : APP_NAME ;
}

Loading…
Cancel
Save