Fixes #194

As per #194, this ensures templates are returned as HTML strings.