htmlencode improved and js beautified
more tests