silverstripe/sapphire — pull request #995 by nyeholt (2012-12-04 04:49:01+00:00)
Title: BUG Rewrite hashlinks failing on empty a tags

Check for presence of href in _a_ tags before trying to .match them to
prevent null pointer errors.

Some external JS libs (eg tag-it) use \\ structures which get matched
and break

(fixes regression introduced by ff39f9ad38dad4e8a162230ab01ca3121ade9f19)