Closed Bug 338306 Opened 19 years ago Closed 19 years ago

aircanada.com - On trunk, "&nbsp" appears in menus due to UA-sniffing for "firefox"

Categories

(Tech Evangelism Graveyard :: English Other, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bemguard-bugzilla, Unassigned)

References

()

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060516 Minefield/3.0a1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060516 Minefield/3.0a1 The nonbreakable space character code (&nbsp) is visible in the top row of the Air Canada site. This is not visible with Firefox 1.5.0.3. Reproducible: Always Steps to Reproduce: 1.Start Firefox 2.Go to website 3.Observe results Actual Results: & nbsp is visible. Expected Results: & nbsp should not be visible. Pictures to be attached.
From the page source: onmouseover="mouseOver(this,'cellOver')" class="menu"><a href="http://www.aircanada.com/en/offers/">Special&amp;nbspOffers</a></td><td dragover="true" So Firefox Trunk is not wrong here but 1.5.0.3 is. -> moving to Core/HTML:Parser
Assignee: nobody → mrbkap
Status: UNCONFIRMED → NEW
Component: General → HTML: Parser
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → parser
Summary: nbsp text visible with Cairo Win32 Trunk build → &amp;nbsp mis-interpreted
Version: unspecified → 1.8 Branch
The menu is built dynamically, using a function which does bad UA-sniffing (looks for "Firefox", which trunk builds no longer have in their UA string). http://www.aircanada.com/shared/includes/common/nav_top/acoNavButtons.js : function getButtonText(sometext){ var agent = navigator.userAgent.toLowerCase(); if(( agent.indexOf("netscape") != -1) || (agent.indexOf('firefox')!=-1)) { if(sometext.match("&nbsp") == "&nbsp"){ return sometext.replace("&nbsp"," "); } } return sometext; } So this is either Tech Evang or INVALID.
(In reply to comment #4) > (looks for "Firefox", which trunk builds no longer have in their UA string). See bug 334756 for details on that, BTW.
Assignee: mrbkap → english-other
Component: HTML: Parser → English Other
OS: Windows XP → All
Product: Core → Tech Evangelism
QA Contact: parser → english-other
Hardware: PC → All
Version: 1.8 Branch → unspecified
Sorry for all this bugspam.
Summary: &amp;nbsp mis-interpreted → aircanada.com - On trunk, "&nbsp" appears in menus due to UA-sniffing for "firefox"
seems okay now
(In reply to comment #7) > seems okay now > Indeed, someone commented out that sniffing function: function getButtonText(sometext){ /* var agent = navigator.userAgent.toLowerCase(); if(( agent.indexOf("netscape") != -1) || (agent.indexOf('firefox')!=-1)) { if(sometext.match("&nbsp") == "&nbsp"){ return sometext.replace("&nbsp"," "); } }*/ return sometext; } Resolving WORKSFORME.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
This was pretty clearly FIXED, as far as I can tell, by commenting out the sniffing. Fixing resolution and verifying.
Resolution: WORKSFORME → FIXED
Status: RESOLVED → VERIFIED
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: