small xss vulnerability and translation ability fix

plus some code cleaning: all extra spaces removed