(In [6372]) Revert [6368]. Fixes #5448, fixes #5247 by adding a new filter to hook in specifically to add attributes, rather than filtering the whole thing. Minor formatting cleanup of comments_popup_link.