Browse Source

Added Pontus Ullgren's re-hash of Tyler's re-write of my code to de-fang
HTML only messages.

phutnick 24 years ago
parent
commit
6146907888
1 changed files with 11 additions and 2 deletions
  1. 11 2
      functions/mime.php

+ 11 - 2
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('<', '&lt;', $body);
+            break;
+       }
       return $body;
    }