Bug Tracker

Modify

Ticket #7459 (closed bug: duplicate)

Opened 3 years ago

Last modified 3 years ago

Escaping meta-characters in Internet Explorer 6 and 7

Reported by: wall66@… Owned by:
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.3
Keywords: Cc:
Blocking: Blocked by:

Description

Documentation for Selectors contains following part:

«If you wish to use any of the meta-characters (#;&,.+*~':"!^$[]()=>|/@ ) as a literal part of a name, you must escape the character with two backslashes: \\. For example, if you have an an input with name="names[]", you can use the selector $("input[name=names\\[\\]]")

Internet Explorer versions below 8 do not understand selectors with double backslashes before meta-characters in names. For example, selector $('input[name="files\\[\\]"]') does not find tag <input name="files[]" />, while selectors $('input[name="files\[\]"]'), $('input[name="files[]"]') and $('input[name=files[]]') finds it in all browsers.

Which version of the selector is correct? Please, represent your answer in documentation.

And sorry for my english, I hope you understand me.

Change History

comment:1 Changed 3 years ago by wall66@…

Upd: it seems like this belongs only to "find" method

comment:2 Changed 3 years ago by wall66@…

 http://jsfiddle.net/NtYs5/ - try to open it in different browsers

comment:3 Changed 3 years ago by anonymous

in jQuery 1.4.2 and less problem shows up in all browsers

comment:4 Changed 3 years ago by snover

  • Status changed from new to closed
  • Resolution set to duplicate

comment:5 Changed 3 years ago by snover

Duplicate of #6428.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.