summaryrefslogtreecommitdiff
path: root/libyelp/yelp-document.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2012-08-29 14:56:10 +0200
committerDavid King <amigadave@amigadave.com>2015-06-22 10:39:52 +0100
commit42fed52055f59396801a2084ca46b8c7bb70db22 (patch)
tree70c10210c89cc2717cfb83ec69a9574873ef7177 /libyelp/yelp-document.c
parent24d9acf1c0f200ecdff276bb85787116e8c6ac00 (diff)
downloadyelp-42fed52055f59396801a2084ca46b8c7bb70db22.tar.gz
yelp-document: Return HTML mime type insted of NULL for search pages
Diffstat (limited to 'libyelp/yelp-document.c')
-rw-r--r--libyelp/yelp-document.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libyelp/yelp-document.c b/libyelp/yelp-document.c
index 2ead58df..fbb9e160 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) {