URI encode the X-Page-Title header
Browsers's are inconsistent in how they interpret the encoding of a response header in an XHR request, so URI encode it so that it simple ASCII we can then decode it again in the browser.
This commit is contained in:
parent
05caad1a5d
commit
e2aef40437
3 changed files with 10 additions and 5 deletions
|
@ -54,7 +54,7 @@ $(document).ready(function () {
|
|||
|
||||
if (xhr.getResponseHeader('X-Page-Title')) {
|
||||
var title = xhr.getResponseHeader('X-Page-Title');
|
||||
document.title = decodeURIComponent(escape(title));
|
||||
document.title = decodeURIComponent(title);
|
||||
}
|
||||
|
||||
$('head')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue