1 2 3 4 5 6 7 8 9 1. Always add no follow to a tags, unless url is relative or points to the namespace domain. 2. Always remove script tags, unless mathjax is enabled, in which case allow script tags and remove them using beautiful soup, with the exception of mathjax. 3. Always allow a tags, unless link protection is on, in which case only allow a tags by moderators.