Strip error template leading and trailing whitespace.

This is to makes XML output happy (XML can't have any space before the
start of the document).