From 0bc1b4a4cc39426769c07e3b69b2d1e568882a63 Mon Sep 17 00:00:00 2001 From: Radhi Fadlillah Date: Wed, 9 Oct 2019 20:49:26 +0700 Subject: [PATCH] Make sure archive use UTF-8 encoding --- internal/webserver/handler-ui.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/webserver/handler-ui.go b/internal/webserver/handler-ui.go index 0a66c7226..d398fee8e 100644 --- a/internal/webserver/handler-ui.go +++ b/internal/webserver/handler-ui.go @@ -289,8 +289,10 @@ func (h *handler) serveBookmarkArchive(w http.ResponseWriter, r *http.Request, p archiveCSSPath := path.Join(h.RootPath, "/css/archive.css") sourceSansProCSSPath := path.Join(h.RootPath, "/css/source-sans-pro.min.css") - doc.Find("head").AppendHtml(``) - doc.Find("head").AppendHtml(``) + docHead := doc.Find("head") + docHead.PrependHtml(``) + docHead.AppendHtml(``) + docHead.AppendHtml(``) doc.Find("body").PrependHtml(tplOutput.String()) // Revert back to HTML