From: Niki Roo Date: Sun, 6 Aug 2017 11:39:03 +0000 (+0200) Subject: Fix html (gopher links with selectors, useless BR) X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=e236e220a546081f4572447fc2d01764583680ac;p=gofetch.git Fix html (gopher links with selectors, useless BR) --- diff --git a/src/be/nikiroo/gofetch/output/Html.java b/src/be/nikiroo/gofetch/output/Html.java index c087ef2..fea5f67 100644 --- a/src/be/nikiroo/gofetch/output/Html.java +++ b/src/be/nikiroo/gofetch/output/Html.java @@ -13,16 +13,19 @@ public class Html extends Output { @Override public String getIndexHeader() { - String gopherUrl = "gopher://" + hostname + preselector + ":" + port; + String sel = preselector; + if (!sel.isEmpty()) { + sel = "/1" + sel; + } + + String gopherUrl = "gopher://" + hostname + sel + ":" + port; return "

News

\n"// + "

You will find here a few pages full of news, mirroring " + gopherUrl + ".

\n"// - + "
\n"// + "

They are simply scrapped from their associated webpage and updated a few times a day.

\n"// - + "
\n"// ; }