Bug comment containing non-printable whitespace (such as form-feed) causes error when parsing any xml format

RESOLVED DUPLICATE of bug 105960

Status

()

--
minor
RESOLVED DUPLICATE of bug 105960
10 years ago
10 years ago

People

(Reporter: k0u4dz202, Unassigned)

Tracking

Details

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.3) Gecko/2008092510 Ubuntu/8.04 (hardy) Firefox/3.0.3
Build Identifier: 3.0.5

Bug comment containing Form-Feed character 0x0C causes "not well-formed" error when downloading buglist as XML in Firefox 3.0.3.

Reproducible: Always

Steps to Reproduce:
1. Create bug comment containing the form-feed character 0x0C by cut/paste into sample bug.
2. query for bugs that will return that bug in the results
3. click on XML button
Actual Results:  
Here's what is displayed in Firefox:
===================================
XML Parsing Error: not well-formed
Location: http://bugs.itis.ttu.edu/show_bug.cgi
Line Number 4036, Column 1:                                                                     PAGE      1
^
================================================
Here's the contents of the xml, captured with wireshark and converted to a hexdump for easy reading:
$ grep PAGE junk.txt | hexdump -C
00000000  20 20 20 20 20 20 20 20  20 20 3c 63 63 3e zz zz  |          <cc>zz|
00000010  zz zz zz zz zz 40 45 50  41 47 45 2e 4c 52 50 53  |zzzzz@EPAGE.LRPS|
00000020  2e 43 4f 4d 3c 2f 63 63  3e 0a 0c 20 20 20 20 20  |.COM</cc>..     |
00000030  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000070  50 41 47 45 20 20 20 20  20 20 31 0a              |PAGE      1.|
0000007c


Expected Results:  
XML file will be well formed and displayed in browser.
Is that actually a valid failure according to the XML spec, or is that Firefox messing up?
Severity: normal → minor
OS: Linux → All
Hardware: PC → All
(Reporter)

Comment 2

10 years ago
It is a valid failure according to the XML 1.0 spec. These are the only valid characters:

Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]	/* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */

http://www.w3.org/TR/2004/REC-xml-20040204/#charsets
Okay. In that case we need to modify FILTER xml to change that to an HTML entity.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [Good Intro Bug]

Updated

10 years ago
Duplicate of this bug: 461123

Updated

10 years ago
Summary: Bug comment containing Form-Feed character 0x0C causes error when downloading buglist as xml → Bug comment containing non-printable whitespace (such as form-feed) causes error when parsing any xml format

Comment 5

10 years ago
Just a note: Bugzilla html output should be fixed too.

Comment 6

10 years ago
This is a dupe of bug 105960, see e.g. bug 105960 comment 23.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → DUPLICATE
Whiteboard: [Good Intro Bug]
Duplicate of bug: 105960
You need to log in before you can comment on or make changes to this bug.