Package: libcss-perl
Version: 1.08-1
Severity: important

The standard declares:

4.1.9 Comments

Comments begin with the characters "/*" and end with the characters "*/". They
may occur anywhere between tokens, and their contents have no influence on the
rendering.

http://www.w3.org/TR/CSS2/syndata.html#comments

There seems to be no objection to multi-line comments, but such comments are
not properly removed, which can cause the parsing to fail, at least if the
comment occurs inside a style, such as this case:

h1
{
/*
*/
color:green;
}

The problem seems to be an inaccuracy in the regex used to remove comments, in
the parse_string subroutine in CSS.pm:

        # remove comments
        $string =~ s!/\*.*?\*\/!!g;

I think that this should be something like '$string =~ s!/\*.*?\*\/!!gs;', so
that the newline inside the comment will match.  I'm no regex guru, but I've
tested this and it seems to work.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-rc5-lizzie
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libcss-perl depends on:
ii  libparse-recdescent-perl  1.962.2+dfsg-1 Perl module to create and use recu
ii  perl                      5.10.1-5       Larry Wall's Practical Extraction 

libcss-perl recommends no packages.

libcss-perl suggests no packages.

-- no debconf information



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

Reply via email to