Choices should support "Input Format"
kdorff - October 17, 2006 - 15:10
| Project: | Decisions |
| Version: | HEAD |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
There is an option for "Input Format". I assume "description" uses this, but, it would be great if the poll questions would follow the "Input Format" as well.

#1
I like this idea. And you're right, description uses the input format (see also http://drupal.org/node/88210). The problem I saw when using check_markup() instead of check_plain() (which is used now) for choice text is that it wraps the text with
<p>...</p>. It might be possible to solve with some css though.Additionally there is also filter_xss_admin() which would allow HTML without the wrapping, but it don't think it's advised to use that for non-admins, and it also wouldn't support other input formats.
#2
Do you guys think the choices themselves should be filtered, or the question? Initially I was thinking just the main question.
#3
The choice text. It's not much use of allowing HTML on the question, that's what the description is for. And as it's actually a title it would look strange in search results, admin etc.
#4
So in terms of implementation, it seems that the textinputs would be switched to textareas for each choice, and the Input Format block would go between the choices and the settings.
#5
My initial thought was to have the input format just under the description (as usual), keep the input field for choice text (as opposed to textare) but allow HTML (either by using the input format or some other filter). We could just write in a help text that HTML (or the Input format) are allowed, sort of an advanced feature; we support it but don't make the interface more comlicated.
I think I have to see some mockups or wireframes (or patches..) to see with implementation is best (this or Chris').
And it could also be good to think about the usercase for this: I would mostly (or only) use bold text, emphazised text and links. More complicated stuff like images, list etc would go in the description.
#6
I tried my css idea, and it works:
.choices label p {display: inline;
}
...will make the choices line up as usual, even if check_markup wraps the text with
<p>. I don't like to fix markup errors (the p tag shouldn't be there in the first place...) with css though, so I'm not shure if I'm advocating this approach.