Closed Bug 273889 Opened 20 years ago Closed 20 years ago

View page source problem with XML data

Categories

(Toolkit :: View Source, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 70918

People

(Reporter: shivanandt, Assigned: bugs)

Details

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>

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