Fixed filtering of internal and external links