Trim input on noel applyTemplate. (Fix #387)