Questions tagged [drupal-input-format]

An input format is an ordered collection of filters. Any text that is being displayed to the browser should be run through the filters in an input format first.

An input format is an ordered collection of filters. Any text that is being displayed to the browser should be run through the filters in an input format first. The input format then applies all of the filters, in the right order, so that one filter feeds its output to the next, forming a chain. This chaining of filters can be the source of great flexibility as well as great confusion. The flexibility comes from the fact that filters can be made to work together, the confusion comes from the case where filters inadvertently work against each other, one filter undoing the work of the previous filter.

Drupal captures input in its raw form, saving whatever gets submitted straight to the database without alteration. Then, before displaying any such content in the browser, Drupal processes the text by choosing an input format to apply. Why doesn't Drupal apply the filters in an input format before saving input into the database? The answer is simple; flexibility. Changing the text a user has input before saving it in the database, would make it impossible to get back to the original state. A site administrator could never change the configuration of the filters. By filtering on output, not on input, Drupal gives the site administrator the option of changing how content is displayed at any time.

7 questions
5
votes
2 answers

Drupal - How to change input format for comments?

This issue irritates me much. Somehow after installing wysiwig editor my comment body form turned into rich.. bla bla area. I do not want this but I can not find the place where to turn back comment input format to the plain text (or filtered…
Lukasz
  • 19,816
  • 17
  • 83
  • 139
3
votes
4 answers

Drupal filter_form form input

This drupal form snippet will give me a textarea with user able to change filter to full html/wysiwyg mode. My Questions: How can I default to to full html mode? function MY_MODULE_admin() { $form = array(); $form['format'] =…
ernie
  • 71
  • 2
  • 4
1
vote
1 answer

How to change Drupal views HTML filter?

In default Drupal configuration Views module apply "Filtered HTML" filter to HTML code generated by "Rewrite the output of this field". For some reasons I need "Rewrite the output of this field" to generate the next code:
artyom.stv
  • 2,097
  • 1
  • 24
  • 42
1
vote
1 answer

How to pass the cookie with image url in drupal?

here i am passing the image url to the server to get the images. But my path is private so how can i pass the cookie with the image URL to get the image from the server ?
rupesh
  • 2,865
  • 4
  • 24
  • 50
0
votes
1 answer

Can I add a prohibited word list to restrict publishing when encountered?

I have some drupal sites, and a couple of editors putting content constantly. What I want to do is restrict them to their word vocabulary (restrict foul language) so it will simple restrict them from publishing if using any of the words I'm…
PartySoft
  • 2,749
  • 7
  • 39
  • 55
0
votes
2 answers

How to change Drupal input filter behaviour based on output location

I have a Drupal filter module whose output I would like to alter, depending on where the output is going to be displayed. Specifically, I want to the filter to give the full output for nodes, but trim the content down for blocks.
Tim
  • 1
0
votes
1 answer

Drupal 7: HTML tags stripped for every input format, even PHP format

I have a Drupal 7 installation, multilingual. No matter which input format i'm choosing for the node body, every HTML tag is stripped. The input format is well configured. It's like Drupal always uses Plain Text as Filter, even if Full HTML is…
Manicato
  • 9
  • 1
  • 6