I am trying to render html output via templates but the html tags are being displayed as tags. I'm sure (hope) that I am just missing something obvious here. Here's a small complete sample which replicates the problem.
main.nim
import asyncdispatch, jester
import templ8
routes:
get "/":
resp renderHello(renderName("World"))
runForever()
templ8.nim
#? stdtmpl(subsChar = '$', metaChar = '#', toString = "xmltree.escape")
#import xmltree
#
#proc renderName*(name: string): string =
# result = ""
<b>${name}</b>
#end proc
#
#proc renderHello*(nameHtml: string): string=
<!DOCTYPE html>
<html lang="en">
Hello ${nameHtml}
</html>
#end proc
When I run this in the browser I get: Hello <b>World</b>
Thanks for any advice
, toString = "xmltree.escape"
from the filter definition. Just for clarity the template file filter now looks like: #? stdtmpl(subsChar = '$', metaChar = '#')