View page source problem with XML data

RESOLVED DUPLICATE of bug 70918

Status

()

Toolkit
View Source
RESOLVED DUPLICATE of bug 70918
14 years ago
10 years ago

People

(Reporter: Shiva, Assigned: Ben Goodger (use ben at mozilla dot org for email))

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

If you open a xml file in Firefox having invalid xml, the browser reports xml
parsing error as expected. But if you click on the view page source, it shows
the xml correctly. It appears that while showing source, it automatically
converts that to a well formed xml.

To test it, try saving the following xml data in a file and then open it in Firefox.

<?xml version="1.0" encoding="iso-8859-1"?>
<root>
	<child><b>Test child 1</b></child>
	<child><b>Test child 2</b</child>
</root>


As you can see that the closing tag </b of Test child 2 is not proper. If you
open this xml in Firefox, it gives the following error....

XML Parsing Error: not well-formed
Location: file:///c:/test.xml
Line Number 4, Column 27:	<child><b>Test child 2</b</child>
--------------------------^

However if you click on the view page source, it automatically changes that
invalid </b tag to the correct one. See below...



Reproducible: Always
Steps to Reproduce:
1.
2.
3.

Actual Results:  
<?xml version="1.0" encoding="iso-8859-1"?>
<root>
	<child><b>Test child 1</b></child>
	<child><b>Test child 2</b></child>
</root>


Expected Results:  
<?xml version="1.0" encoding="iso-8859-1"?>
<root>
	<child><b>Test child 1</b></child>
	<child><b>Test child 2</b</child>
</root>

Comment 1

14 years ago

*** This bug has been marked as a duplicate of 70918 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.