Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Navigation: When choosing the title, it is unnecessary to escape enti…
Browse files Browse the repository at this point in the history
…ties, since the result will be assigned to document.title (which can presumably accept an unencoded string). Fixes #5749.
  • Loading branch information
Gabriel Schulhof committed Mar 11, 2013
1 parent e5922fa commit 7446992
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/jquery.mobile.navigation.js
Expand Up @@ -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;
}
Expand Down

1 comment on commit 7446992

@joshross4
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.