Closed
Bug 86573
Opened 24 years ago
Closed 24 years ago
Mozilla rendering <br> inside <listing> as an additional line break
Categories
(SeaMonkey :: General, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: kousik, Assigned: asa)
Details
Attachments
(1 file)
|
380 bytes,
text/html
|
Details |
If there is a <br> tag inside a <listing> tag, mozilla inserts a blank line
when NS4 or IE5 doesn't. For example if the source is:
<html>
<body>
<listing>
<br>int main(int ac, char **av)
<br>{
<br> printf("\n");
<br>}
</listing>
</body>
</html>
Mozilla shows it as:
int main(int ac, char **av)
{
printf("\n");
}
Whereas NS4 or IE5 shows:
int main(int ac, char **av)
{
printf("\n");
}
Who is correct? I guess mozilla, coz putting a line-break when you
see a <br> makes sense; but is it not the case that we ignore these
tags when we're in <listing> ?
Comment 1•24 years ago
|
||
The listing tag isn't in the html 4 speicification.
You should use the code tag instead, which is in the html 4 specification.
br tags inside the code tag are displayed as you expect.
Marking as INVALID.
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 2•24 years ago
|
||
But <CODE> destroys all the indentation! It shows
int main(int ac, char **av)
{
printf("\n");
}
Leading spaces need be preserved :-(
Comment 3•24 years ago
|
||
What about using PRE ?
Comment 4•24 years ago
|
||
It may not be included in HTML 4.0, but it was included in 3.2 as depreciated.
It's arguable whether Mozilla should support it. Here's a page that describes
the listing tag:
http://www.blooberry.com/indexdot/html/tagpages/l/listing.htm
The best bet is to use a combination of <code> and <pre> to get similar
appearance. Unfortunately, this may not render quite the same (listing was
supposed to support 132 character lines), but you can probably come close.
Comment 5•24 years ago
|
||
Comment 6•24 years ago
|
||
The HTML 4.01 spec says Listing is obsolete and should be replaced with PRE.
http://www.w3.org/TR/html401/appendix/changes.html#h-A.3.1.3
It appears that Mozilla behaves a bit strangely with PRE tags. Previous browsers
including Nav 4.x seem to ignore BR tags inside PRE. Mozilla renders them as
linebreaks.
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•