[yelp/wip/webkit2-port: 4/18] yelp-document: Return HTML mime type insted of NULL for search pages
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp/wip/webkit2-port: 4/18] yelp-document: Return HTML mime type insted of NULL for search pages
- Date: Sat, 14 Feb 2015 10:32:24 +0000 (UTC)
commit cc0ecb726604e34e31ea185c3fe767654a9d5264
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]