added options for templater and selfcontained to not include encodeHtml