fix js syntax and unicode spaces