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</a>
<a href="http://abc.com/_123">link 2</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!
source
share