fix js encoding