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

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

@BradRubenstein
Copy link

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
Copy link

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

gabrielschulhof pushed a commit that referenced this issue Mar 11, 2013
…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 pushed a commit that referenced this issue Mar 11, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants