summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-12-05 21:32:49 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-12-05 21:32:49 +0200
commit35abf58ef4e8795c495d9f07398cfc7617566774 (patch)
tree78ecb411e1d0d52a209255ae76bbe9b518f1f111 /src/ui
parentf34f6f64316bcee71663689bb7b2fb89d9b6863b (diff)
DocumentWidget: Default to plain text for text/*
Also application/json. IssueID #88
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/documentwidget.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 7cd51561..4ac48323 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -859,12 +859,13 @@ static void updateDocument_DocumentWidget_(iDocumentWidget *d, const iGmResponse
859 while (nextSplit_Rangecc(mime, ";", &seg)) { 859 while (nextSplit_Rangecc(mime, ";", &seg)) {
860 iRangecc param = seg; 860 iRangecc param = seg;
861 trim_Rangecc(&param); 861 trim_Rangecc(&param);
862 if (equal_Rangecc(param, "text/plain")) { 862 if (equal_Rangecc(param, "text/gemini")) {
863 docFormat = plainText_GmDocumentFormat; 863 docFormat = gemini_GmDocumentFormat;
864 setRange_String(&d->sourceMime, param); 864 setRange_String(&d->sourceMime, param);
865 } 865 }
866 else if (equal_Rangecc(param, "text/gemini")) { 866 else if (startsWith_Rangecc(param, "text/") ||
867 docFormat = gemini_GmDocumentFormat; 867 equal_Rangecc(param, "application/json")) {
868 docFormat = plainText_GmDocumentFormat;
868 setRange_String(&d->sourceMime, param); 869 setRange_String(&d->sourceMime, param);
869 } 870 }
870 else if (startsWith_Rangecc(param, "image/") || 871 else if (startsWith_Rangecc(param, "image/") ||