[evolution/wip/webkit2] Define charset=UTF-8 for text/html in webkit_uri_scheme_request_finish()



commit 15487c0713493184e69ef6e8aaa45547c24bedd7
Author: Milan Crha <mcrha redhat com>
Date:   Fri Mar 11 12:15:57 2016 +0100

    Define charset=UTF-8 for text/html in webkit_uri_scheme_request_finish()
    
    The charset from the header has precedence over defined charset
    inside HTML's <body><meta></body> tag, and evolution converts texts
    into UTF-8 unconditionally, thus thus double-decoding could lead
    to broken HTML body text.

 mail/e-mail-display.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index 332f54b..4718775 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -2363,7 +2363,7 @@ mail_display_process_mail_uri_scheme_request (GTask *task,
        input_stream =
                g_memory_input_stream_new_from_bytes (bytes);
 
-       webkit_uri_scheme_request_finish (request, input_stream, -1, "text/html");
+       webkit_uri_scheme_request_finish (request, input_stream, -1, "text/html; charset=UTF-8");
 
        g_object_unref (input_stream);
        g_object_unref (output_stream);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]