New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 779942 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

querySelector() if quote and/or square bracket on the right side of the attribute selector was missing, it won't report an error, but Safari will

Reported by vhp...@msn.com, Oct 31 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.75 Safari/537.36

Steps to reproduce the problem:
Try something like document.querySelector('meta[name="description');

NOTE: double quote and square bracket on the right side was missing.

But it works perfectly and won't report an error!

What is the expected behavior?
It should not work and report error.

What went wrong?
No ieda.

Did this work before? N/A 

Chrome version: 62.0.3202.75  Channel: stable
OS Version: 10.0
Flash Version:
 
Components: -Blink Blink>DOM
Labels: Needs-Bisect Needs-Triage-M62
Cc: vamshi.k...@techmahindra.com
Labels: -Needs-Bisect Triaged-ET M-64 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Checked the issue on the reported chrome version stable 62.0.3202.75 and on the latest canary 64.0.3254.0 using Windows 10, Ubuntu 14.04 and Mac 10.12.6. As the issue is seen from M50(50.0.2634.0) treating it as non-regression and marking as untriaged.

Comment 4 by kochi@chromium.org, Nov 2 2017

Components: -Blink>DOM Blink>CSS
Can CSS people triage this?

Status: Available (was: Untriaged)
Behavior on Firefox is same as on Chrome, missing quote and square bracket works and does not report an error.

This seems to be the relevant spec https://drafts.csswg.org/selectors-4/#attribute-selectors

I can't find any explicit mention in the spec of whether a missing closing brace or quote should result in an error.

Labels: Code-Parser
We should raise a CSS WG issue ( https://github.com/w3c/csswg-drafts/issues ) for the spec to be clarified, and mention how the various browsers currently behave.



Labels: Update-Quarterly Hotlist-Interop

Comment 8 by vhp...@msn.com, Nov 3 2017

In CSS file / <style> element, if do this, Chrome will ignore the rules in the selector, I think maybe should make CSS file and querySelector() behave the same.
Behavior on Edge is the same as on Chrome and Firefox.
Owner: ericwilligers@chromium.org
Status: ExternalDependency (was: Available)
Raised https://github.com/w3c/csswg-drafts/issues/1933
Labels: -M-64 -Needs-Triage-M62
Status: WontFix (was: ExternalDependency)
Chrome/Edge/Firefox are correct.
Works as Intended.
Project Member

Comment 13 by bugdroid1@chromium.org, Nov 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e696bfacfee0f956e9d832dab288b795fde7047b

commit e696bfacfee0f956e9d832dab288b795fde7047b
Author: Eric Willigers <ericwilligers@chromium.org>
Date: Mon Nov 06 23:18:13 2017

wpt: querySelector with missing right token

Add Web Platform Test for user-reported difference
in behavior between Safari and Chrome/Edge/Firefox.

Correct behavior confirmed in
https://github.com/w3c/csswg-drafts/issues/1933

BUG= 779942 

Change-Id: I808b39a7cb678a6efe09991697abdabef54384f9
Reviewed-on: https://chromium-review.googlesource.com/755015
Reviewed-by: Bugs Nash <bugsnash@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514284}
[add] https://crrev.com/e696bfacfee0f956e9d832dab288b795fde7047b/third_party/WebKit/LayoutTests/external/wpt/css/selectors/missing-right-token.html

#13 - woo hoo! You beat me to it. :)

Sign in to add a comment