Permalink
Browse files

Navigation: When choosing the title, it is unnecessary to escape enti…

…ties, since the result will be assigned to document.title (which can presumably accept an unencoded string). Fixes #5749.
  • Loading branch information...
gabrielschulhof committed Mar 11, 2013
1 parent e5922fa commit 744699272f6272c866e0335b84b3c52c60646f08
Showing with 1 addition and 1 deletion.
  1. +1 −1 js/jquery.mobile.navigation.js
@@ -872,7 +872,7 @@ define( [
// if title element wasn't found, try the page div data attr too
// If this is a deep-link or a reload ( active === undefined ) then just use pageTitle
var newPageTitle = ( !active )? pageTitle : toPage.jqmData( "title" ) || toPage.children( ":jqmData(role='header')" ).find( ".ui-title" ).getEncodedText();
var newPageTitle = ( !active )? pageTitle : toPage.jqmData( "title" ) || toPage.children( ":jqmData(role='header')" ).find( ".ui-title" ).text();
if ( !!newPageTitle && pageTitle === document.title ) {
pageTitle = newPageTitle;
}

1 comment on commit 7446992

@joshross4

This comment has been minimized.

Show comment
Hide comment
@joshross4

joshross4 commented on 7446992 Apr 4, 2013

This solves my problem, I came up with the same fix too.
https://forum.jquery.com/topic/page-headers-are-not-unescaped-when-used-as-page-title

Please sign in to comment.