From ea3d567ed7bfeedaa11deee42872bc8d09dc29bb Mon Sep 17 00:00:00 2001 From: phutnick Date: Wed, 12 Sep 2001 19:43:37 +0000 Subject: [PATCH] Added Pontus Ullgren's re-hash of Tyler's re-write of my code to de-fang HTML only messages. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1498 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/functions/mime.php b/functions/mime.php index f032ece7..61952677 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -690,8 +690,17 @@ } else if ($encoding == "base64") { $body = base64_decode($body); } - - // All other encodings are returned raw. + + switch($show_html_default) { + case '1': // Safe HTML + // Philippe's code + break; + case '2': // Any HTML + break; + default: // No HTML + $body = str_replace('<', '<', $body); + break; + } return $body; } -- 2.25.1