Update trim for IE compatibility