- πΊπΈUnited States smustgrave
If still a valid task please reopen addressing issue summary update from #17
A big goal for Drupal 7 is to enable text formats (formerly known as "input formats") on as many textareas as possible, both in Drupal core and contrib. This gives fine-grained control over allowed HTML tags and opens up new possibilities for different ways to input the text, including much better integration with rich text editors (see http://drupal.org/project/wysiwyg).
A list of places in core that don't use text formats but should is at http://groups.drupal.org/node/9072. What's stopping them? It's probably just the fact that dealing with text formats is kind of a pain - you have to figure out how to store the data correctly, display it correctly, etc.
This patch takes the first steps towards making it easy. Since the new Field API in core provides native support for text format handling within text.module, and since it also supports attaching fields to any kind of "object", all we have to do is treat some of the random textareas in Drupal -- that are currently stored in the variable
table -- as field-enabled objects, and we get everything else for free! (We also get the benefit of not filling up the variable
table with gigantic paragraphs of text that get loaded on every page view, even though they are rarely needed...)
The attached patch is basically working code, although it's still rough around the edges and the exact implementation strategy is certainly open to debate. However, it currently does the following:
#text_format => TRUE,
Then, when displaying the text, find places in your code that used to be along the lines of this:
filter_xss(variable_get('variable_name'))
and replace them with this:
drupal_get_text('variable_name')
That's it, no more work required. (Note that this is also a big security improvement, since using this system means you no longer have to remember to sanitize the text yourself every time you display it.)
Comments?
Closed: outdated
11.0 π₯
Last updated
Involves an in-browser What-You-See-Is-What-You-Get content editor.
Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
If still a valid task please reopen addressing issue summary update from #17