noahmorrison / chevron

A Python implementation of mustache
MIT License
480 stars 52 forks source link

Feature proposal: support custom string escaping #107

Open taylorjacklespriggs opened 2 years ago

taylorjacklespriggs commented 2 years ago

Supports custom string escaping. Ex.

chevron.render(template="{{test}}", data={"test": '"'}, escape=lambda s: s.replace('"', "???")) == "???"

This feature is available in pystache which is no longer maintained.