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

VERIFIED FIXED

Status

VERIFIED FIXED
13 years ago
4 years ago

People

(Reporter: bemguard-bugzilla, Unassigned)

Tracking

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

13 years ago
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.
(Reporter)

Comment 1

13 years ago
Created attachment 222358 [details]
Page rendered with 1.5.0.3
(Reporter)

Comment 2

13 years ago
Created attachment 222359 [details]
Page rendered with Trunk

Comment 3

13 years ago
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.

Updated

13 years ago
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"

Comment 7

12 years ago
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
Last Resolved: 12 years ago
Resolution: --- → WORKSFORME

Comment 9

12 years ago
This was pretty clearly FIXED, as far as I can tell, by commenting out the sniffing. Fixing resolution and verifying.
Resolution: WORKSFORME → FIXED

Updated

12 years ago
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.