Skip to content

Commit

Permalink
Make sure archive use UTF-8 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
RadhiFadlillah committed Oct 9, 2019
1 parent a3e1563 commit 0bc1b4a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/webserver/handler-ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(`<link href="` + archiveCSSPath + `" rel="stylesheet">`)
doc.Find("head").AppendHtml(`<link href="` + sourceSansProCSSPath + `" rel="stylesheet">`)
docHead := doc.Find("head")
docHead.PrependHtml(`<meta charset="UTF-8">`)
docHead.AppendHtml(`<link href="` + archiveCSSPath + `" rel="stylesheet">`)
docHead.AppendHtml(`<link href="` + sourceSansProCSSPath + `" rel="stylesheet">`)
doc.Find("body").PrependHtml(tplOutput.String())

// Revert back to HTML
Expand Down

0 comments on commit 0bc1b4a

Please sign in to comment.