Updating branch refs/heads/master
         to 37b6f2c1a1562436ac2cd2378f8aa23295bd96fa (commit)
       from ec7cb0f6905052578384782fb26c21c63ddcf72c (commit)

commit 37b6f2c1a1562436ac2cd2378f8aa23295bd96fa
Author: Christian Dywan <[email protected]>
Date:   Mon Nov 22 21:46:07 2010 +0100

    Take quotes in content types into account

 postler/postler-content.vala |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index d8a2a04..9f5e376 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -397,7 +397,13 @@ public class Postler.Content : WebKit.WebView {
 
         string[] parts = content_type.replace (" = ", "=").split_set ("; \t");
         string filename = null;
-        foreach (var part in parts) {
+        for (int i = 0; i < parts.length; i++) {
+            string part = parts[i];
+            unowned string? next = parts[i + 1];
+            if ("\"" in part && next != null && "\"" in next) {
+                part += parts[i + 1];
+                i++;
+            }
 
             if (part.has_prefix ("charset="))
                 charset = part.substring (8, part.length - 8).replace ("\"", 
"");
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to