Trim preview template so that createElement doesn't pick up an empty text node rather than the container.