Fix quotifying link hrefs in certain cases.

That's a 5 months old bug that didn't seem to affect anyone...