Fixed IE8 compatibility issue with Trim()