XSS fix

Protected the code against cross-site scripting