If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

<listing> parses content and should end with blank line

VERIFIED FIXED

Status

()

Core
HTML: Parser
P3
normal
VERIFIED FIXED
17 years ago
17 years ago

People

(Reporter: Hallvard B Furuseth, Assigned: rickg)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fix in hand, URL)

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (X11; U; SunOS 5.7 sun4u)
BuildID:    2000100209

<listing>'s content should be CDATA
(like <plaintext> and <xmp>).

</listing> does not end the line, even though
<listing> startsa line.  Looks like <listing>
is a block tag and </listing> an inline tag:-)

Reproducible: Always
Steps to Reproduce:
1. Visit the demo URL.

Actual Results:    w <blank line> xüyz

Expected Results:  w <blank line> x&uuml;y <blank line> z

Netscape too parses the content.
It does insert a blank line after </listing>.
(Reporter)

Comment 1

17 years ago
Oops - use   javascript:'w<listing>x<br>y</listing>z'
which should render as '... x<br>y' and not '...x linebreak y'.
The URL was  javascript:'w<listing>x&uuml;y</listing>z'
but Bugzilla translated the '&uuml;' to 'ü'.  Come to
think of it, maybe that's correct for URLs.

Comment 2

17 years ago
I see it, but i don't understand enough
javascript:'w<listing>x<br>y</listing>z'
w
<halfline/>
x
yz

Hixie: do you have a url for the spec that states cdata?
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Solaris → All
Hardware: Sun → All
(Assignee)

Comment 3

17 years ago
The 3.2 spec has this to say: <!ELEMENT (XMP|LISTING) - -  %literal>
(where %literal==CDATA). However, backward compatibility tests show that 
listings in older browsers actually contain an odd array of things, from 
headings to div's/span's, to tables and lists.

I'm not at all clear what the author means by "should end with blank line".
Please clarify.
(Reporter)

Comment 4

17 years ago
"older browsers" = netscape, I presume.
Lynx and Mosaic get it right.

"should end with a blank line": I should have said,
the browser should insert a blank line or at least a
line break at </listing>, since it's a block tag.
Currently, the 'y</listing>z' part displays as 'yz'.
(Assignee)

Comment 5

17 years ago
Thanks for the clarification. There is a bug here in fact. I'll add a patch 
shortly.
Status: NEW → ASSIGNED
(Assignee)

Comment 6

17 years ago
Created attachment 18414 [details] [diff] [review]
Patch to fix bug.
(Assignee)

Updated

17 years ago
Whiteboard: fix in hand

Updated

17 years ago
Keywords: patch, review
(Assignee)

Comment 7

17 years ago
Changed elementTable for <listing> element. All better.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 8

17 years ago
updated qa contact.
QA Contact: janc → bsharma

Comment 9

17 years ago
Verified on:
build: 2001-06-04-09-Mtrunk
platform: WinNT

The url is resolved as expected.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.