From 7fc40c6beeb3be2c8c257df2ddf57ebbea3a3efc Mon Sep 17 00:00:00 2001 From: Thomas Groman Date: Tue, 27 Apr 2021 21:56:52 -0700 Subject: Add support for XHTML This patch sends XHTML down the HTML renderer path instead of erroring out unsupported mime. It does not implement XHTML exactly to the spec. That could hopefully be looked at in the future. Signed-off-by: Thomas Groman --- src/about/help.gemini | 1 + src/browsertab.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/about/help.gemini b/src/about/help.gemini index f273923..ed83991 100644 --- a/src/about/help.gemini +++ b/src/about/help.gemini @@ -427,6 +427,7 @@ If you would like to disable page caching, set the [Total cache size limit] to 0 * text/plain * text/gemini * text/html +* application/xhtml+xml * text/markdown * text/gophermap * image/* diff --git a/src/browsertab.cpp b/src/browsertab.cpp index fa4ed9a..f790e8e 100644 --- a/src/browsertab.cpp +++ b/src/browsertab.cpp @@ -649,7 +649,7 @@ void BrowserTab::renderPage(const QByteArray &data, const MimeType &mime) this->current_location, doc_style); } - else if (not plaintext_only and mime.is("text","html")) + else if (not plaintext_only and mime.is("text","html") or mime.is("application","xhtml+xml")) { document = HtmlRenderer::render( data, -- cgit v1.2.3