diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index fb0bc0a..f23f305 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -1538,6 +1538,8 @@ efh_url_requested(GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EMForm
 
 	if (job) {
 		job->stream = em_html_stream_new(html, handle);
+		if (!EM_FORMAT (efh)->charset)
+			em_html_stream_set_flags (EM_HTML_STREAM (job->stream), GTK_HTML_BEGIN_CHANGECONTENTTYPE);
 		em_format_html_job_queue(efh, job);
 	}
 
diff --git a/mail/em-html-stream.c b/mail/em-html-stream.c
index f74ba8d..3beada9 100644
--- a/mail/em-html-stream.c
+++ b/mail/em-html-stream.c
@@ -86,6 +86,7 @@ html_stream_sync_write (CamelStream *stream,
 	if (emhs->html_stream == NULL)
 		emhs->html_stream = gtk_html_begin_full (
 			emhs->html, NULL, NULL, emhs->flags);
+	gtk_html_set_default_engine (emhs->html, (emhs->flags & GTK_HTML_BEGIN_CHANGECONTENTTYPE) != 0);
 
 	gtk_html_stream_write (emhs->html_stream, buffer, n);
 
