From 8ec7ad053a9a291ea2619055b1ca1989d4c975b9 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 5 Nov 2014 23:44:31 +0000 Subject: Make the fetching of a contents encoding generic. The frontends previously had to use an html renderer API to get the encoding of a content. This also required the explicit checking of the contents type rather than using the existing content API to abstract this knowledge. --- gtk/viewsource.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gtk/viewsource.c') diff --git a/gtk/viewsource.c b/gtk/viewsource.c index 7ff8ad64b..9a103eef0 100644 --- a/gtk/viewsource.c +++ b/gtk/viewsource.c @@ -23,7 +23,6 @@ #include "utils/messages.h" #include "desktop/browser.h" #include "content/content.h" -#include "render/html.h" #include "gtk/viewdata.h" #include "gtk/viewsource.h" @@ -62,7 +61,7 @@ void nsgtk_viewsource(GtkWindow *parent, struct browser_window *bw) sprintf(title, "Source of %s - NetSurf", nsurl_access(browser_window_get_url(bw))); ret = utf8_from_enc(source_data, - html_get_encoding(hlcontent), + content_get_encoding(hlcontent), source_size, &ndata, &ndata_len); -- cgit v1.2.3