Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to return "safe" content from filters #51

Closed
GuillaumeGomez opened this issue Jul 5, 2024 · 0 comments · Fixed by #54
Closed

Make it possible to return "safe" content from filters #51

GuillaumeGomez opened this issue Jul 5, 2024 · 0 comments · Fixed by #54

Comments

@GuillaumeGomez
Copy link
Contributor

We could for example add an enum to ensure that, for example:

enum NeedsEscape<T> {
    Yes(T),
    No(T),
}

Where NeedsEscape::Yes would be the default. Then it'd just be a matter of implementing From<T: Display> for NeedsEscape to keep it working for most cases. And in case someone want to add a filter that returns content that should not be escaped, they can.

What do you think @Kijewski ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant