[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#46179: marked as done (weblint complains about <!--comment-->)



Your message dated Mon, 30 Aug 2004 19:49:33 +0100
with message-id <20040830184933.GA18461@unjust.cyrius.com>
and subject line Removed from the archive
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 28 Sep 1999 14:59:29 +0000
Received: (qmail 15115 invoked from network); 28 Sep 1999 14:59:28 -0000
Received: from wireless-067-123.tele2.co.uk (HELO taos.demon.co.uk) (212.19.67.123)
  by master.debian.org with SMTP; 28 Sep 1999 14:59:28 -0000
Received: from zircon.tao.co.uk (zircon.tao.co.uk [172.16.100.118]) 
          by taos.demon.co.uk (8.9.0/8.8.3) with ESMTP id PAA12064
          for <submit@bugs.debian.org>; Tue, 28 Sep 1999 15:58:57 +0100
Received: from localhost (zircon.tao.co.uk) [127.0.0.1] (maydell)
	by zircon.tao.co.uk with esmtp (Exim 3.03 #1 (Debian))
	id 11VyiW-000439-00; Tue, 28 Sep 1999 15:58:56 +0100
To: submit@bugs.debian.org
Subject: weblint complains about <!--comment-->
Date: Tue, 28 Sep 1999 15:58:56 +0100
From: Peter Maydell <maydell@tao-group.com>
Message-Id: <E11VyiW-000439-00@zircon.tao.co.uk>

Package: weblint
Version: 1.93-1

If you run newer versions of weblint on the following HTML file:
===begin===
<HTML><HEAD><TITLE>Test Page</TITLE></HEAD>
<BODY><H1>Test Page</H1>
<P>This is a test page.
<!--Comment-->
</BODY></HTML>
===endit===

it complains:

zircon$ weblint /tmp/t.html
/tmp/t.html(4): unknown element <!--COMMENT-->.

As far as I can understand from the HTML specifications, this is 
a perfectly valid comment. Weblint is expecting a space after the 
!--, which is not required. weblint v1.020 did not consider this an error.

The source for weblint has a comment in it:
 #---------------------------------------------------------------
 # handle comments
 #       we don't quite handle the full definition of comments.
 #       yet.
 #---------------------------------------------------------------

which suggests that the author is vaguely aware of the problem...

The following patch to /usr/lib/perl5/Weblint.pm seems to fix this bug, but
it could use some more testing than I've given it, and ideally the problem
ought to be solved in a more generic way (including proper handling of the
full SGML comment definition, ideally.)

===begin patch===
--- Weblint.pm.dist	Tue Sep 28 15:49:24 1999
+++ Weblint.pm	Tue Sep 28 15:54:38 1999
@@ -165,8 +165,16 @@
 	#	we don't quite handle the full definition of comments.
 	#	yet.
         #---------------------------------------------------------------
-	if ($tag eq '!--')
+	# If the tag starts '!--' it's a comment. We can't just check
+	# for equal to '!--' because if there's no space after the
+	# -- (example: "<!--Comment here-->") we'll think the tag is
+	# "!--COMMENT"...
+	# This really ought to be fixed more cleanly than this...
+	#   -- Peter Maydell <pmaydell@chiark.greenend.org.uk> 28/9/1999
+	if ($tag =~ /^\!\-\-(.*)/)
 	{
+            # Tack anything we misparsed into the tag back onto the HTML...
+	    $html = $1 . $html;
 	    if ($html =~ /((.*?)--\s*>)/)
 	    {
 		my $comment = $2;

===endit===

hope this helps
Peter Maydell
---------------------------------------
Received: (at 46179-done) by bugs.debian.org; 30 Aug 2004 18:49:46 +0000
>From tbm@cyrius.com Mon Aug 30 11:49:46 2004
Return-path: <tbm@cyrius.com>
Received: from sorrow.cyrius.com [65.19.161.204] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1C1rDu-0000Vt-00; Mon, 30 Aug 2004 11:49:46 -0700
Received: by sorrow.cyrius.com (Postfix, from userid 10)
	id E6B0564D44; Mon, 30 Aug 2004 18:49:44 +0000 (UTC)
Received: by unjust.cyrius.com (Postfix, from userid 1000)
	id 84FA23F07B; Mon, 30 Aug 2004 19:49:33 +0100 (BST)
Date: Mon, 30 Aug 2004 19:49:33 +0100
From: Martin Michlmayr <tbm@cyrius.com>
To: 46179-done@bugs.debian.org, 66956-done@bugs.debian.org,
	114179-done@bugs.debian.org, 150254-done@bugs.debian.org,
	191224-done@bugs.debian.org, 198753-done@bugs.debian.org
Subject: Removed from the archive
Message-ID: <20040830184933.GA18461@unjust.cyrius.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040722i
Delivered-To: 46179-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-2.0 required=4.0 tests=BAYES_01 autolearn=no 
	version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 
X-CrossAssassin-Score: 5

weblint has been removed from  Debian unstable because it had no
maintainer for 1.5 years and because there are better replacements,
such as weblint-perl.
-- 
Martin Michlmayr
tbm@cyrius.com



Reply to: