Fixed #151 by replacing native trim() function with jQuery wrapper.