Fixes XSS attack vector (Fixes #527)