This project is archived and is in readonly mode.

#635 ✓resolved
Etienne Desautels

Selectors with space in value doesn't work

Reported by Etienne Desautels | April 10th, 2009 @ 05:32 PM | in 2.0 (closed)

Using selectors where the value have space (or other splitter) in it doesn't work because the splitter regex split on every space. Ex. of not working selectors:

$('myElement').getElements('input[name=log foo]');


$('myElement').getElements('input[name="log foo"]');



and with "contains"

$$('p:contains("find me")');

I fixed the code and now it seems to work for many cases (I try a lot of combinations). But ideally there should be some unit tests that cover all theses cases. Also I don't know if is use by other calls beside getElement[s] and ":contains" ?

This bug is somehow related to the ticket #599.

I attached a patch (but created against the full mootools.core, sorry). But only a few lines.

My regex find square bracket an parenthesis atom so that it doesn't search for splitter in theses part.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket