Skip to content

Do not HTML-escape help_text in Browsable API forms.#3812

Merged
lovelydinosaur merged 1 commit intoencode:masterfrom
sinitsynsv:master
Jun 2, 2016
Merged

Do not HTML-escape help_text in Browsable API forms.#3812
lovelydinosaur merged 1 commit intoencode:masterfrom
sinitsynsv:master

Conversation

@sinitsynsv
Copy link
Copy Markdown

Some fields in django forms (SetPasswordForm for example, new_password1 field) have html help_text. I think in browsable api help_text must be rendered as is.

@jpadilla
Copy link
Copy Markdown
Contributor

@sinitsynsv thanks, I see where this would come in handy, although I've never needed to do so. Would love to see what others think.

@lovelydinosaur
Copy link
Copy Markdown
Contributor

lovelydinosaur commented Jun 2, 2016

Given the Django docs, this seems valid... https://docs.djangoproject.com/en/1.9/ref/models/fields/#help-text

Note that this value is not HTML-escaped in automatically-generated forms. This lets you include HTML in help_text if you so desire.

Thanks for this @sinitsynsv!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants