This led to the following error on IE8 when we used it:
Message: Object doesn’t support this property or method
There’s a stackoverflow thread suggesting some different ways of implementing your own ‘trim()’ method but since we’re using jQuery already we decided to just use the ‘$.trim()’ function from there.
var cleaned = ourString.trim();
var cleaned = $.trim(ourString);
I’m sure I must have come across this before but I don’t remember when!