From e236e220a546081f4572447fc2d01764583680ac Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Sun, 6 Aug 2017 13:39:03 +0200 Subject: [PATCH] Fix html (gopher links with selectors, useless BR) --- src/be/nikiroo/gofetch/output/Html.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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"// ; } -- 2.27.0