Bug 136807

Summary: CSS value in whitespace-separated list attribute selector (~=) mishandles tab/newline/etc.
Product: WebKit Reporter: Richard Gibson <richard.gibson>
Component: CSSAssignee: Benjamin Poulain <benjamin>
Severity: Minor CC: benjamin, dan, koivisto, syoichi
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://codepen.io/gibson042/pen/ICExL
Bug Depends on:    
Bug Blocks: 110007    
Description Flags
Patch none

Description Richard Gibson 2014-09-14 18:34:51 PDT
jQuery ticket: http://bugs.jquery.com/ticket/15233
workaround: https://github.com/jquery/sizzle/commit/aca006dd2d3fb3c407ff99bb25153852d73e0f6b#diff-3
Spec reference: http://www.w3.org/TR/css3-selectors/#attribute-representation http://www.w3.org/TR/css3-selectors/#whitespace

The "[attribute~=word]" selector should split the attribute value on all CSS whitespace (space U+0020, tab U+0009, line feed U+000A, carriage return U+000D, form feed U+000C) and look for the test word in the resulting list. Webkit appears to only split on space characters.
Comment 1 Benjamin Poulain 2014-09-15 20:28:20 PDT
Thank you for filing a bug for this! I'll fix this asap.
Comment 2 Benjamin Poulain 2014-09-16 19:10:06 PDT
Created attachment 238233 [details]
Comment 3 Benjamin Poulain 2014-09-17 13:02:06 PDT
Comment on attachment 238233 [details]

Clearing flags on attachment: 238233

Committed r173697: <http://trac.webkit.org/changeset/173697>
Comment 4 Benjamin Poulain 2014-09-17 13:02:15 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Alexey Proskuryakov 2014-09-17 14:58:45 PDT
*** Bug 115954 has been marked as a duplicate of this bug. ***