[Xfce4-commits] <postler:master> Take quotes in content types into account
Christian Dywan
noreply at xfce.org
Mon Nov 22 22:58:02 CET 2010
Updating branch refs/heads/master
to 37b6f2c1a1562436ac2cd2378f8aa23295bd96fa (commit)
from ec7cb0f6905052578384782fb26c21c63ddcf72c (commit)
commit 37b6f2c1a1562436ac2cd2378f8aa23295bd96fa
Author: Christian Dywan <christian at twotoasts.de>
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 ("\"", "");
More information about the Xfce4-commits
mailing list