empty hrefs should not have a href set
various improvements for Elgg 1.9 version of this plugin