Hi, I already posted this on the jQuery BugTracker, but nobody seems to notice. Maybe I can get some help here and I hope you don't regard this a double post. (the link to the bug report is http://dev.jquery.com/ticket/5482)
Using closing or opening brackets, '(' or ')', in the contains filter sometime crashes Firefox. I tried escaping the bracket by '\\' or by '\', but this does not work. Neither putting or omitting " " around the contains expression makes a difference. I found the problem developing an add-on, but it's the same in JS on a webpage. To test this, I copied the souce from http://en.wikipedia.org/wiki/Banana to my server and addded following to the header. <script> $(document).ready(function(){ var exp = ':contains("fleshy edible inner portion )" )'; var pos = $('body').find(exp); console.log(pos); }) </script> This will always reproduce the error (= force FF to stop the script, if the code comes from a webpage, or completely crash FF, if the code comes from an add-on), which according to FF occurs in line 1585 of jquery-1.3.2 The current nightly crashes exactly the same. A solution would be help me a lot. thx, jakkob