-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
mark_safe #68
Comments
Do you see any difference in the resulting rendering? Django forms use mark_safe() in conjunction with escape(). Here the template languages gives us escaping for free (unless |
The difference I see is this name = forms.CharField(max_length=5, help_text='<b>Name</b>') If I use django form I get Name (in bold, as I want). While if I use floppyforms it always appears as Name, which is not what I want, and it is the same if I use |
I think that is an imparity between Django and Floppyforms that we should not resolve. Django is a little inconsistent with which values are marked as safe and which are not. For example Floppyform should keep the more consistent behaviour of always sticking with one of those. The safer bet here is probably to go with autoescaping by default. If you want the string to be displayed as is in the template, then use
That is something that we should document. Thanks for the report! |
The as_XXX methods don't use mark_safe (opposed to the standard django as_XXX methods).
Is this intentional?
The text was updated successfully, but these errors were encountered: