Added changes to prevent XSS attacks through editors and templates