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
However, I'm building HTML messages with Fluent and I need to insert user-generated content into the final messages using placeables. The thing is that user could provide values containing HTML, which could break the final markup or could even be dangerous. All templating systems allow to escape values passed to the templates. It would be great if Fluent would have such functionality as well.
Fluent bundle has a transform option, but it receives everything, but not the values.
I know I can escape the values before passing them to Fluent, but having it at the Fluent level will be more convenient and will better mimic how templating systems work.
What do you think? Thanks!
The text was updated successfully, but these errors were encountered:
slavafomin
added a commit
to slavafomin/fluent.js
that referenced
this issue
Apr 23, 2022
Hello!
Thank you for this great library!
However, I'm building HTML messages with Fluent and I need to insert user-generated content into the final messages using placeables. The thing is that user could provide values containing HTML, which could break the final markup or could even be dangerous. All templating systems allow to escape values passed to the templates. It would be great if Fluent would have such functionality as well.
E.g.:
Fluent bundle has a
transform
option, but it receives everything, but not the values.I know I can escape the values before passing them to Fluent, but having it at the Fluent level will be more convenient and will better mimic how templating systems work.
What do you think? Thanks!
The text was updated successfully, but these errors were encountered: