[yelp/wip/amigadave/webkit2-port: 5/23] yelp-document: Return HTML mime type insted of NULL for search pages



commit e72730e7917f44505ceb6ad6b14298438e07a806
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Wed Aug 29 14:56:10 2012 +0200

    yelp-document: Return HTML mime type insted of NULL for search pages

 libyelp/yelp-document.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libyelp/yelp-document.c b/libyelp/yelp-document.c
index 2ead58d..fbb9e16 100644
--- a/libyelp/yelp-document.c
+++ b/libyelp/yelp-document.c
@@ -948,7 +948,7 @@ document_read_contents (YelpDocument *document,
         GVariantIter *iter;
         gchar *url, *title, *desc, *icon; /* do not free */
         gchar *index_title;
-        GString *ret = g_string_new ("<html><head><style type='text/css'>");
+        GString *ret = g_string_new ("<html xmlns=\"http://www.w3.org/1999/xhtml\";><head><style 
type='text/css'>");
 
         colors = yelp_settings_get_colors (yelp_settings_get_default ());
         g_string_append_printf (ret,
@@ -1136,6 +1136,9 @@ document_get_mime_type (YelpDocument *document,
 {
     gchar *real, *ret = NULL;
 
+    if (page_id != NULL && g_str_has_prefix (page_id, "search="))
+      return g_strdup ("application/xhtml+xml");
+
     g_mutex_lock (&document->priv->mutex);
     real = hash_lookup (document->priv->page_ids, page_id);
     if (real) {


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