Open Bug 603904 Opened 14 years ago Updated 2 years ago

Page Info counts meta tags in xml document but doesn't show them

Categories

(Firefox :: Page Info Window, defect)

defect

Tracking

()

UNCONFIRMED

People

(Reporter: info, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:2.0b8pre) Gecko/20101012 Firefox/4.0b8pre
Build Identifier: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b8pre) Gecko/20101012 Firefox/4.0b8pre

I was trying to puzzle out Firefox nightly behavior with application/xhtml+xml documents , and noticed a separate minor bug.

If you bring up Tools > Page Info > General for an XML document that happens to have tags named "meta" in it, it counts the number of these meta tags but doesn't show their values.

Reproducible: Always

Steps to Reproduce:
1. Create an xml document with some HTML-style meta tags in it.
2. Save as .xml
3. Load in Firefox
4. Choose Tools > Page Info > General
Actual Results:  
Page Info shows
Meta (nn tags)
but if you expand, it has empty lines for each meta tag.

Expected Results:  
Don't attempt to show meta tags in an arbitrary XML document.  There's no reason the tag "meta" will have the name and content attributes that HTML meta tags have.

The reason it fails is omni.jar!/chrome/browser/content/browser/pageinfo/pageInfo.js does metaNodes = document.getElementsByTagName("meta") which succeeds in an XML document, but then blindly adds a row of 
  metaNodes[i].name || metaNodes[i].httpEquiv, metaNodes[i].content
and such access doesn't work in the XML DOM.
Still happens with Mozilla/5.0 (X11; Linux x86_64; rv:12.0a1) Gecko/20120105 Firefox/12.0a1

In case you missed it, click the URL I provided http://www.skierpage.com/moz_bugs/bad_pageinfo_meta.xml
OS: Linux → All
Hardware: x86_64 → All
Version: unspecified → Trunk
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.