Fixes #16524 Moving filtering logic from comments templatetag to manager.

Fixes #16524 Moving filtering logic from comments templatetag to manager. Thanks to mat for the patch.