Side navigation
#15199 closed bug (wontfix)
Opened July 31, 2014 03:12AM UTC
Closed July 31, 2014 04:24PM UTC
Bug in Chrome, no show Syntax error
Reported by: | cuadove | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.11.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
This code works in Chrome Correctly (My version: 36.0.1985.125 m) instead of: "Error: Syntax error, unrecognized expression: input[name=test_name"
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> </head> <body> <form> <input type="text" name="test_name" value="hi!" /> </form> <script> var ready = $("input[name=test_name]"); console.log(ready.val()); var error = $("input[name=test_name"); console.log(error.val()); </script> </body> </html>
Attachments (0)
Change History (1)
Changed July 31, 2014 04:24PM UTC by comment:1
resolution: | → wontfix |
---|---|
status: | new → closed |
Yes, that is a bug in Chrome: https://codereview.chromium.org/320783002/ (or more specifically, a problem with the CSS spec in that it allows implicit closing of strings/brackets/etc.). Sizzle and jQuery are more strict, but we always try the native engine first so these just slip under our radar.
http://jsfiddle.net/BbuNm/