I need to select a link node given its url. Using an attribute selector works quite well except for a few rare cases when the url has a tilda. I have no control over the link urls. 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</a>
<a href="http://abc.com/_123">link 2</a>
</body>
This prints:
undefined
<a href="http://abc.com/_123">
I looked at the level 3 selectors spec and didn't find anything on the tilde character being unsupported for attribute selector values which are just CSS strings.
Help!
This appears to have been fixed in 1.6 http://bugs.dojotoolkit.org/ticket/10651
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With