New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

page with header title containing HTML entity displays encoded entity in document title #5749

Closed
BradRubenstein opened this Issue Mar 11, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@BradRubenstein

BradRubenstein commented Mar 11, 2013

When I have a a title containing an HTML entity, the document title shows the encoded entity.

<div data-role="page">
 <div data-role="header">
  <h1>Hale &amp; Farewell</h1>
 </div>
   ...
</div>

In my browser titlebar (Chrome 25.0.1364.160) is "Hale &amp; Farewell". I expected "Hale & Farewell".

May be related to #1447, but open as of 1.3.0.

I notice that $.mobile.changePage() is referring to

newPageTitle = toPage.children( ":jqmData(role='header')" )
   .find( ".ui-title" ).getEncodedText();

I have a feeling the getEncodedText() is suspicious, but I'm a JQM newbie and am not sure.

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Mar 11, 2013

Contributor

Weird - If you replace &amp; with &copy; it works just fine.

Contributor

gabrielschulhof commented Mar 11, 2013

Weird - If you replace &amp; with &copy; it works just fine.

gabrielschulhof added a commit that referenced this issue Mar 11, 2013

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.

(cherry picked from commit 7446992)

gabrielschulhof added a commit that referenced this issue Mar 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment