You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to upload a json file, but got an error.
This fixed it with escape="none"
Are there any plans to add json escaping?
Example code
use rinja::Template;#[derive(Template)]#[template(path = "a.json")]structFooter<'a>{year:u16,enterprise:&'astr,}
Example error
1. no escaper defined for extension 'json'. The available extensions are: "", "htm", "html", "j2", "jinja", "jinja2", "md", "none", "rinja", "svg", "txt", "xml", "yml"
The text was updated successfully, but these errors were encountered:
I think that's a too specialized use case, with too many script-injection hazards. Alas, currently we don't have a good example how to write an escaper. I opened an issue for that: #348.
To make things short: You have to add an empty struct that implements Escaper. Then you must configure the extension "json" to use this escaper.
I want to upload a json file, but got an error.
This fixed it with escape="none"
Are there any plans to add json escaping?
Example code
Example error
The text was updated successfully, but these errors were encountered: