Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#331567: mozilla-firefox: parse bug with "--" in comment, in XHTML mode

0 views
Skip to first unread message

Karl Chen

unread,
Oct 3, 2005, 10:40:12 PM10/3/05
to
Package: mozilla-firefox
Version: 1.0.6-5
Severity: normal


gecko mis-parses the following:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>foo
<!-- a -- b -->
bar</html>

firefox, galeon, etc. display:
foo -- a -- b --> bar
instead of:
foo bar

"view source" on this document shows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>foo
-- a -- b -->
bar</html>

-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable'), (60, 'unstable'), (40, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-quack+roar.cs.berkeley.edu
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

-- no debconf information


--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Piotr Engelking

unread,
Oct 7, 2005, 1:10:13 PM10/7/05
to
On 04/10/05, Karl Chen <quarl+keyword+...@nospam.quarl.org> wrote:
> gecko mis-parses the following:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html>foo
> <!-- a -- b -->
> bar</html>
>
> firefox, galeon, etc. display:
> foo -- a -- b --> bar
> instead of:
> foo bar

You seem to feed your code to the browser in a HTML, rather than XHTML
mode. Moreover, your HTML is invalid (it's not a well-formed XHTML,
either). Your second '--' closes the first comment, so 'b' is a
non-whitespace character inside a comment declaration but outside a
comment, which is an error.

Karl Chen

unread,
Oct 7, 2005, 4:10:11 PM10/7/05
to
>>>>> On 2005-10-07 09:56 PDT, Piotr Engelking writes:

Piotr> You seem to feed your code to the browser in a HTML,
Piotr> rather than XHTML mode. Moreover, your HTML is invalid
Piotr> (it's not a well-formed XHTML, either). Your second
Piotr> '--' closes the first comment, so 'b' is a
Piotr> non-whitespace character inside a comment declaration
Piotr> but outside a comment, which is an error.

I see, I didn't realize -- rather than just --> ended comments.
Anyway it's confusing that the behavior is different in HTML and
XHTML modes, and "view source" displays something different than
the actual source HTML. Thanks.

--
Karl 2005-10-07 12:50

0 new messages