Set up input formats for nodes and comments

You will need two new input formats, one for processing nodes created from emails and a second for processing comments. Remember, input formats are applied at the time of creation, and probably will need to strip out code, headers and signatures from emails so the content posted on the site is easily readable.

There is a Mailhandler input filter that will strip out headers and signatures. Most commonly, a signature begins with the signature separator "-- " (hyphen hyphen space) if you are using Thunderbird, Outlook or another email reader. Those programs do not by default insert a signature separator in emails created by clicking Reply-to sender or Reply-to all, even if you include a signature in replies. This is because some people choose to put the reply above the quoted original message and some put the reply below the quoted message.

There are two Mailcomment filters, a basic one and a more aggressive one. The first will strip out everything beginning with the line "On DATE, SENDER wrote:" The latter takes out other garbage you don't want posted. You will at least need the basic filter. Experiment to see whether the more aggressive one is needed on your site.

When you installed Mailhandler and Mailcomment they may have added sample input formats to your site. If not, create new ones like the input filters you use for content created in the usually manner. You can clone the Filtered HTML input format and name it Filtered HTML (Mailhandler) and Filtered HTML (Mail Comment).

Settings for Filtered HTML (Mailhandler)

  1. Go to the Edit screen.
  2. Choose roles that may use this filter.
  3. At least, check the Mailhandler signature remover filter.
  4. It's probably a good idea to check the HTML Corrector filter, the Relative to absolute tags filter, the URL filter, and, perhaps, the HTML filter to limit allowed tags.
  5. If the Line break filter is listed, make sure it is unchecked.
  6. Click Save
  7. Go to the Configure screen and make sure the Signature separator field is set to "-- " (without the quote marks).
  8. Click Save.
  9. Go to the Rearrange screen and place the Mailhandler signature separator filter at the top of the list.
  10. Click save.

Settings for Filtered HTML (Mail Comment)

  1. For the most part, the settings above will work here as well.
  2. At least check the Malcomment basic filter. Experiment to determin whether you need the more aggressive Mailcomment filter and the Mailhandler signature remover filter.
  3. On the rearrange screen place the Mailcomment basic filter at the top, followed by the Mailcomment aggressive filter and Mailhandler signature remover, if they are activated.
Projects