Trim text nodes
Fix trim
Only allow string inputs. Escape potential ol triggers
Tidy as per jshint
Use qunit-node for running tests