I'm using Snap framework with Heist templating engine. The problem is that Heist corrupts javascript code inlined into html:
<script type="text/javascript">alert('hello');</script>
Transformed into:
<script type="text/javascript">alert('hello');</script>
How can I tell Heist to preserve contents of the script
tag?
Edit: I just implemented such splice:
verbatimSplice :: MonadIO m => Splice m
verbatimSplice = do
node <- getParamNode -- get <script> node
stopRecursion -- stop recursive processing of splices
lift $ liftIO $ print node -- show me the node
return [node] -- return <script> as is
But binding this splice to script tag does not help. It prints
Element "script" [("type","text/javascript")] [Text "alert('hello');"]
so, I think, html entity substitution takes place after running all splices.