Fixed HTML rewrite for public links