Skip to content

Feature request: customizable escape function #125

@redsun82

Description

@redsun82

It' be nice to be able to pass an escaping function to accommodate instantiating templates for non-html languages. Pystache supports this via an escape parameter. As a use case, I use mustache templates in C++ code generation, where escaping & breaks everything. I can explicitly unescape things in the templates, but it's just easier to pass escape=lambda x: x. JSON string escaping comes to mind as another use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions