Fixed XSS issues

Vectors can be found at https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet.

NOTE: At this point, the Hilary branch should not be merged into the newframework branch anymore. They have diverted too much.