[Xfce4-commits] <postler:master> Don't accidentally override the subject charset
Christian Dywan
noreply at xfce.org
Sat May 29 17:48:01 CEST 2010
Updating branch refs/heads/master
to b3501ada850617b0525b826835f0861b354ebfd3 (commit)
from 414be82a02a575aa6589640c1ced73beae9210df (commit)
commit b3501ada850617b0525b826835f0861b354ebfd3
Author: Christian Dywan <christian at twotoasts.de>
Date: Sat May 29 17:32:09 2010 +0200
Don't accidentally override the subject charset
postler/postler-content.vala | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index 140360a..a9fec22 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -142,10 +142,9 @@ public class Postler.Content : WebKit.WebView {
var stream = new DataInputStream (contents.read (null));
string line;
- string default_charset = "UTF-8";
- string content_type = "text/plain; charset=" + default_charset;
+ string content_type = null;
string mime_type = "text/plain";
- string charset = default_charset;
+ string charset = "UTF-8";
string[] parts;
GLib.StringBuilder body;
@@ -232,10 +231,12 @@ public class Postler.Content : WebKit.WebView {
if (reply != "")
reply = linkify_address (reply, arguments);
- parts = content_type.split ("; charset=");
- if (parts != null && parts[0] != null && parts[1] != null) {
- mime_type = parts[0];
- charset = parts[1];
+ if (content_type != null) {
+ parts = content_type.split ("; charset=");
+ if (parts != null && parts[0] != null && parts[1] != null) {
+ mime_type = parts[0];
+ charset = parts[1];
+ }
}
bool plain_text = false;
More information about the Xfce4-commits
mailing list