summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2018-08-14 16:14:10 +0100
committerMichael Drake <michael.drake@codethink.co.uk>2018-08-14 16:15:12 +0100
commit9fa6c1e0fb2d6f5a0c95e7680b0ad24f9f7615db (patch)
tree4b74eec75d689a38b58e58a168693d6fbe45b362
parent7458cfa9992f66b87f3effef5c86405888f9410b (diff)
downloadnetsurf-9fa6c1e0fb2d6f5a0c95e7680b0ad24f9f7615db.tar.gz
netsurf-9fa6c1e0fb2d6f5a0c95e7680b0ad24f9f7615db.tar.bz2
Text handling: Display application/json, rather than offering download.
-rw-r--r--content/handlers/text/textplain.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/content/handlers/text/textplain.c b/content/handlers/text/textplain.c
index af990d1d7..692ba7ebe 100644
--- a/content/handlers/text/textplain.c
+++ b/content/handlers/text/textplain.c
@@ -1331,6 +1331,12 @@ nserror textplain_init(void)
lwc_string_unref(textplain_default_charset);
}
+ error = content_factory_register_handler("application/json",
+ &textplain_content_handler);
+ if (error != NSERROR_OK) {
+ lwc_string_unref(textplain_default_charset);
+ }
+
return error;
}