diff -r eca262aa23ff -r 1f729ff8cab4 pidgin/gtkwebview.c --- a/pidgin/gtkwebview.c Wed May 30 22:05:28 2012 +0000 +++ b/pidgin/gtkwebview.c Sat Jun 02 02:39:29 2012 +0000 @@ -518,7 +518,7 @@ } void -gtk_webview_load_html_string_with_imgstore(GtkWebView *webview, const char *html) +gtk_webview_load_html_string(GtkWebView *webview, const char *html) { GtkWebViewPriv *priv = GTK_WEBVIEW_GET_PRIVATE(webview); char *html_imged; @@ -543,12 +543,12 @@ gtk_webview_append_html(GtkWebView *webview, const char *html) { GtkWebViewPriv *priv = GTK_WEBVIEW_GET_PRIVATE(webview); - char *escaped = gtk_webview_quote_js_string(html); - char *script = g_strdup_printf("document.write(%s)", escaped); - webkit_web_view_execute_script(WEBKIT_WEB_VIEW(webview), script); + WebKitDOMDocument *doc; + WebKitDOMHTMLElement *body; + doc = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(webview)); + body = webkit_dom_document_get_body(doc); + webkit_dom_html_element_insert_adjacent_html(body, "beforeend", html, NULL); priv->empty = FALSE; - g_free(script); - g_free(escaped); } void