Allow tag autocomplete in <IE8

* "trim" isn't available in IE8, use jQuery’s trim instead