Skip to content

Browser title update for Ajax links (issue 581) improperly escapes HTML entities #1447

gfortytwo opened this Issue Apr 13, 2011 · 9 comments

9 participants


This seems to be a problem with the feature added to A4 in this issue:


If the ajax-retrieved page has a "title" tag in the header whose text contains an HTML entity (of the form ampersand-something-something-semicolon) then when the browser title is updated it shows the literal entity (the HTML source) rather than the translated character, implying that the ampersand/semicolon are being escaped.

The same problem does not seem to occur if a "data-title" attribute is provided on a "page" div.


Test scenario:

  • first page with link to another page (no special target or rel specified)

  • the linked page should have a title containing encoded html entities, for instance: Communiqu& eacute;s (space after ampersand just there for entity to be visible and not decoded by issues page)

When you click on that link for the first time, the new page title shows: "Communiqu& eacute;s".
Strangely enough, when you go back and then forth again you will see the title with the html entity correctly decoded: "Communiqués".

Reproduced on both iphone4 and Chrome - character encoding: utf-8 defined in meta of both pages.


Thanks for the detailed report. We'll take a look at our code for the title parsing.

aknosis commented May 17, 2011

+1 for this, I use the same <title> for web and mobile and in web I get proper entity rendering yet the escaped versions on mobile.


Reproduced in beta1

jocull commented Aug 1, 2011

This is happening for me as well.

@johnbender johnbender was assigned Aug 8, 2011

Hi I am also having this issue - any news on it or ideas for a quickfix?


Any updates on this ?


So this was planned for RC2 and got pushed out to 1.0? Are you confident that it will be in 1.0 or is there a chance that it will get pushed out again?

@gseguin gseguin was assigned Oct 28, 2011

We're never 100% sure, but it's still on our radar for 1.0

@garann garann added a commit that referenced this issue Nov 4, 2011
@garann garann Fix for #1447 - create element and read text from there to unescape e…
…ntities in page title
@timmywil timmywil pushed a commit to timmywil/jquery-mobile that referenced this issue Nov 5, 2011
@garann garann Fix for #1447 - create element and read text from there to unescape e…
…ntities in page title
@gseguin gseguin closed this Nov 7, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.