fixed some bugs about XSS Attack