Trim templates before passing to the view handler