Bug 136807 - CSS value in whitespace-separated list attribute selector (~=) mishandles tab/newline/etc.
Summary: CSS value in whitespace-separated list attribute selector (~=) mishandles tab...
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Minor
Assignee: Benjamin Poulain
URL: http://codepen.io/gibson042/pen/ICExL
: 115954 (view as bug list)
Depends on:
Blocks: 110007
  Show dependency treegraph
Reported: 2014-09-14 18:34 PDT by Richard Gibson
Modified: 2014-09-17 14:58 PDT (History)
4 users (show)

See Also:

Patch (33.93 KB, patch)
2014-09-16 19:10 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***