<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>5622</bug_id>
          
          <creation_ts>2008-04-03 20:30:24 +0000</creation_ts>
          <short_desc>Selector with attribute test; whitespace before ] reported as invalid</short_desc>
          <delta_ts>2009-02-18 07:05:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSSValidator</product>
          <component>CSS 2.1</component>
          <version>CSS Validator</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="CecilWard">cecil</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>19727</commentid>
    <comment_count>0</comment_count>
    <who name="CecilWard">cecil</who>
    <bug_when>2008-04-03 20:30:24 +0000</bug_when>
    <thetext>The following CSS fragment is incorrectly reported as invalid. (under selected grammar=css2.1)

test case 1:

[attr=val ] {}


(note: whitespace before ] ).

Other tests with whitespace inserted in other possible positions show correct behaviour.


The following test cases all fail similarly

test case 2:

[attr~=val ] {}


test case 3:

[attr|=val ] {}

etc for other operators


====

Notes: This bug is confined to the (attr OP ident) cases. The case of (attr OP string) is not affected. (See test case 4 below.)



Suggest adding additional test cases:

test case 4:

[attr = &quot;val&quot; ] {}

test case 4 is correctly reported as valid.


--
test case 5:

[attr=val/**/] {}

test case 5 is correctly reported as valid.
--

test case 6:

[attr ] {}

(attribute existence test, whitespace before ]) test case 6 is correctly reported as valid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23809</commentid>
    <comment_count>1</comment_count>
    <who name="Yves Lafon">ylafon</who>
    <bug_when>2009-02-18 07:05:07 +0000</bug_when>
    <thetext>The grammar of attrib() was indeed wrong (in the validator), catching &lt;S&gt; only for &lt;STRING&gt; and not &lt;IDENT&gt;.
Fixed now on http://qa-dev.w3.org:8001/css-validator/</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>