This would be good with Philippe's code that strips out unliked HTML tags.
Change the $show_html_default option to be something like
0 = no html (default)
1 = safe html
2 = any html
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1492
7612ce4b-ef26-0410-bec9-
ea0150e637f0
// this if statement checks for the entity to show as the
// primary message. To add more of them, just put them in the
// order that is their priority.
// this if statement checks for the entity to show as the
// primary message. To add more of them, just put them in the
// order that is their priority.
- global $startMessage, $username, $key, $imapServerAddress, $imapPort;
+ global $startMessage, $username, $key, $imapServerAddress, $imapPort,
+ $show_html_default;
$id = $message->header->id;
$urlmailbox = urlencode($message->header->mailbox);
$id = $message->header->id;
$urlmailbox = urlencode($message->header->mailbox);
// If there are other types that shouldn't be formatted, add
// them here
// If there are other types that shouldn't be formatted, add
// them here
- if ($body_message->header->type1 != "html") {
+ if ($body_message->header->type1 != "html" && $show_html_default) {
translateText($body, $wrap_at, $body_message->header->charset);
}
translateText($body, $wrap_at, $body_message->header->charset);
}
$body = base64_decode($body);
}
$body = base64_decode($body);
}
- if (!$show_html_default) {
- $body = str_replace('<', '<', $body);
-// $body = str_replace('>', '>', $body);
-// Both this and $body = htmlspecialchars($body); mess up inline
-// quoting :-( Anyway, just replacing < gets the job done.
- }
-
// All other encodings are returned raw.
return $body;
}
// All other encodings are returned raw.
return $body;
}