From 795d42e23fc6612e7a7069514c6bba3e0bf1b5f8 Mon Sep 17 00:00:00 2001 From: graf25 Date: Mon, 27 May 2002 19:32:42 +0000 Subject: [PATCH] Committing more from bug #494216. This doesn't seem to break anything for me, but then again, I don't see the initial issue. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2871 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/functions/mime.php b/functions/mime.php index 5f38f709..e5b0e9fc 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -229,6 +229,21 @@ function mime_get_element (&$structure, $msg, $ent_id) { $pos++; } $structure = substr($structure, strlen($text) + 2); + } else if ($char == '{') { + /** + * loop through until we find the matching quote, + * and return that as a string + */ + $pos = 1; + $len = ''; + while (($char = $structure{$pos}) != '}' + && $pos < strlen($structure)) { + $len .= $char; + $pos++; + } + $structure = substr($structure, strlen($len) + 4); + $text = substr($structure, 0, $len); + $structure = substr($structure, $len + 1); } else if ($char == '(') { // comment me $end = mime_match_parenthesis (0, $structure); -- 2.25.1