From 07c90a64b5461152c5009571edf3f0b9e13c3b76 Mon Sep 17 00:00:00 2001 From: George Lemon Date: Thu, 29 Aug 2024 18:36:44 +0300 Subject: [PATCH] use `domInnerHtml` for now Signed-off-by: George Lemon --- src/timpkg/engine/compilers/html.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/timpkg/engine/compilers/html.nim b/src/timpkg/engine/compilers/html.nim index 1cdd5c0..8086a1d 100755 --- a/src/timpkg/engine/compilers/html.nim +++ b/src/timpkg/engine/compilers/html.nim @@ -119,6 +119,7 @@ const domSetAttribute = "$1.setAttribute('$2','$3');" domInsertAdjacentElement = "$1.insertAdjacentElement('beforeend',$2);" domInnerText = "$1.innerText=\"$2\";" + domInnerHtml = "$1.innerHTML=`$2`;" stdlibPaths = ["std/system", "std/strings", "std/arrays", "std/os", "*"] # Scope API, available for library version of TimEngine @@ -2007,7 +2008,8 @@ proc walkNodes(c: var HtmlCompiler, nodes: seq[Node], if not c.isClientSide: write x, true, node.identSafe else: - add c.jsOutputCode, domInnerText % [xel, c.toString(x, scopetables)] + # add c.jsOutputCode, domInnerText % [xel, c.toString(x, scopetables)] + add c.jsOutputCode, domInnerHtml % [xel, c.toString(x, scopetables)] of ntDotExpr: writeDotExpression() of ntBracketExpr: writeBracketExpr() of ntVariableDef: