Closed (fixed)
Project:
Mailing List Archive
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Sep 2007 at 17:26 UTC
Updated:
18 Oct 2007 at 01:12 UTC
A small enhancement: currently, when a HTML message is displayed, the HMTL tags are visible, which is probably not the intended behavior.
This could be solved by stripping the tags from the message before storing them into the database, or changing line 723 in the mailarchive_view.module v1.6 in the function theme_mailarchive_view_message_body()
from:
$output = htmlentities($message->body);
to:
$output = htmlentities(strip_tags($message->body));
Stripping the tags before adding them in the database reduces the storage space and doesn't impact viewing perfomance, but of course alters the original message
Maybe this should be a configurable option ?
Comments
Comment #1
BartHanssens commentedmm, on second thought, maybe the following solution is better:
in mailarchive_view.module, function theme_mailarchive_view_message_body(),
$output .= $message->body;
in mailarchive.module _mailarchive_message_save()
- strip HTML tags (some people do send HTML mails to mailing lists...)
- decode 7bit encoded mails (think about all the accents in a French mail)
- encode the body to utf8 (since the database table should be utf8)
$body = quoted_printable_decode(strip_tags($body));
$body = utf8_encode($body);
Comment #2
ahoeben commentedInstead of filtering before insertion in the database, would it not be more Drupal-like to filter using the Drupal filter system at display-time, using a selectable filter set? Filter results will be cached, so performance-wise it would not have much impact.
Comment #3
jeremy commentedGo to the administrative mailarchive configuration page and enable a Drupal filter for displaying mailarchive messages. (admin >> mailing list archives >> configure >> Message body format).
You will probably want to configure your input filter to "Escape all tags".
Comment #4
(not verified) commented