Dojo.query does not work for an attribute selector that includes a tilde character (~)

I need to select the node link based on its URL. Using an attribute selector works quite well, except in a few rare cases where a URL has a tilde. I do not control links to links. Here is an example:

<script>
dojo.ready(function() {
    var node = dojo.query('a[href="http://abc.com/~123"]')[0];
    console.debug(node);
    node = dojo.query('a[href="http://abc.com/_123"]')[0];
    console.debug(node);
});
</script>
...
<body>
    <a href="http://abc.com/~123">link 1&lt;/a>
    <a href="http://abc.com/_123">link 2&lt;/a>
</body>

Fingerprints:

undefined
<a href="http://abc.com/_123">

I looked at the spec level 3 selector and found nothing on the tilde, which is not supported for attribute selector values ​​that are just CSS Lines.

Help!

+5
source share
1 answer

This seems to have been fixed in 1.6 http://bugs.dojotoolkit.org/ticket/10651

+1
source

All Articles