HTML Escaping in Dhall

Hi all :slight_smile: I’ve been working on re-writing some of my static site generation in dhall, since I’ve had some success with this in the past (and also for pdfs and tex). One thing I’m wondering is if anyone has written a Text -> Text function for escaping HTML strings anywhere. Last time I looked into this I think we didn’t have Text/replace, but now that Text/replace exists this seems like something that should be possible. It might even be useful enough to be in the prelude alongside /Text/shell-escape.dhall , but then again maybe not!

If there’s nothing like this yet out there, I’d be happy to look into writing it myself. Just asking now to avoid any unnecessary duplication of work :slight_smile:

The XML module is doing some form of escaping: /XML/render.dhall

ah thanks, that should be perfect for what I need!