Closed Bug 255386 Opened 21 years ago Closed 14 years ago

microrent.co.uk - Bad browser sniffing and JS causing messed up homepage

Categories

(Tech Evangelism Graveyard :: English Other, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: DJGM1974, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803 Microrent PLC is a company that offers Apple Macintosh computers for rent Their website homepage is a totally garbled mess when accessed in any current Mozilla based browser. Having looked at the page source, it appears that bad browser sniffing and non-standard JavaScript is the root of the problem. The site detects any Mozilla browser as Netscape 4.x, and uses the following heap of non-standard (AFAIK NS4.x specific) JavaScript, hence the mess. <SCRIPT LANGUAGE="JavaScript"> <!-- function init(){ if (navigator.appName == "Netscape") { layerStyleRef="layer."; layerRef="document.layers"; styleSwitch=""; }else{ layerStyleRef="layer.style."; layerRef="document.all"; styleSwitch=".style"; } } function showLayer(layerName){ eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"'); } function hideLayer(layerName){ eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"'); } function displayText(text,fieldName){ if (navigator.appName == "Netscape") { document.layers[fieldName+ "Netscape"].document.write(text); document.layers[fieldName+ "Netscape"].document.close(); }else{ document.all[fieldName+"Netscape"].innerHTML=text; } } // --> </SCRIPT> The site works fine in Internet Explorer 6.0 on Windows XP (with SP2) and IE 5.2.3 on Mac OS X. The same garbled mess also appears in Safari 1.2.3. Since Safari is built upon the same rendering used in Konqueror, I'm sure it is very likely that the same shambolic mess also appears in KDE's browser as well. Reproducible: Always Steps to Reproduce: 1. Go to http:///www.microrent.co.uk/ in any Mozilla based browser. 2. Prepare to be shocked at the shambolic mess you see before you! 3.
Plenty messy in Linux trunk too (overlapping text and worse).
Summary: Bad browser sniffing and JS causing messed up homepage. → microrent.co.uk - Bad browser sniffing and JS causing messed up homepage
Status: UNCONFIRMED → NEW
Ever confirmed: true
Looks fixed in both Camino-trunk and Firefox 2.
INCOMPLETE due to lack of activity since the end of 2009. If someone is willing to investigate the issues raised in this bug to determine whether they still exist, *and* work with the site in question to fix any existing issues, please feel free to re-open and assign to yourself. Sorry for the bugspam; filter on "NO MORE PRE-2010 TE BUGS" to remove.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.