Ref T13302. In at least some browsers (including Safari and Chrome), when you write this:
<a href="#">...</a>
...and then access <that node>.href, you get http://local-domain-whatever.com/path/to/current/page# back.
This is wonderful, but not what we want. Access the raw attribute value instead, which is # in all browsers.