Pretty Print should be used for XML view source




8 years ago
8 years ago


(Reporter: mlissner+bugzilla, Unassigned)


Firefox Tracking Flags

(Not tracked)




8 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0E)
Build Identifier: 

If I'm looking at an XML page and go to View Source, the resulting display of the source code should be rendered using Pretty Print so the XML is tidy, and the nodes are lined up neatly. 

This is necessary because when the XHTML namespace is used on an inner element, pretty print won't be used to show the XML. See:

Another option could be to have an option in the source viewer for View > Pretty Print, which could be toggled by users.

Reproducible: Always

Steps to Reproduce:
1. Go to a page that has nested XHTML: 
2. Hit view source
3. Note that Pretty Print is not used, and that the XML is hard to read.
4. Note that this page lacks nested XHTML, and thus Pretty Print is used:
"View source" is supposed to show the source exactly as it came from the server, including the original whitespace.

It sounds like you actually want a "view as prettyprinted tree" option for random XML documents, no?

Comment 2

8 years ago
Ultimately, I just want a way to see docs with pretty print turned on. If that's a button that appears when viewing an XML file, or if it's an option in "View Source", either way is fine, so long as I can do it.
You need to log in before you can comment on or make changes to this bug.