Skip to content

Option to disable HTML encoding of values #119

Closed
@imsedim

Description

@imsedim

Even though Handlebars is mainly used for producing HTML templates, it's a great tool that could be used for generating any other types of content.

With Handlebars.Net there is a caveat though - HTML escape is always used (unless explicitly turned off in the template or helper), meaning that any non-HTML template would have a lot of unnecessary noise ({{{...}}} or custom helpers) to alleviate this (one of the reasons why it matters is that EncodedTextWriteris a bit too strict and encodes everything above char 159, compared to Handlebars.js that only encodes symbols &<>"'`=)

The handlebars.js has an option noEscape which is helpful in exactly this situation.

So this issue is basically a feature request to include this noEscape capability in the Handlebars.Net either in the form of configuration option or as an extension point for custom-written TextWriter

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions