nickel-org / rust-mustache

mustache template library for rust
Other
202 stars 61 forks source link

Certain characters are printed as HTML values rather than real characters #46

Closed vertexmachina closed 7 years ago

vertexmachina commented 7 years ago

I'm building a map like this:

let data = mustache::MapBuilder::new()
    .insert_str("test", "<test_&_string<")
    .build();

And the generated string looks like this:

&lt;test_&amp;_string&lt;

instead of like this:

<test_&_string>

I'm not sure if this is a bug or if there is a configuration of the builder that I'm missing.

vertexmachina commented 7 years ago

Closed upon realizing this is from the mustache spec. Using triple mustaches avoids the issue.