Filter script to replace internal links with externals