Fix trim function call that was causing WPeC js fatal error
Merge branch 'pr-1694-fix-js-trim-error'