phroxy

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.z3bra.org/phroxy.git
Log | Files | Refs | LICENSE

commit e133739f4bb2117d8e6389ab5a7ce83291131410
parent b7b6e2df588288393b4b643fe6d8c860085195ac
Author: Willy Goiffon <dev@z3bra.org>
Date:   Mon, 14 Sep 2020 13:58:35 +0200

Simplify formatting using inline CSS by default

Diffstat:
Mconfig.def.h | 2+-
Mphroxy.c | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -4,7 +4,7 @@ const char *htmlfmt = "<html><head>\n" "<meta charset=\"utf-8\">" "<meta name=\"viewport\" content=\"width=device-width\">" - "<link rel=\"stylesheet\" type=\"text/css\" href=\"https://z3bra.org/z3bra.css\">" + "<style>body { white-space: pre; }</style>" "<title>gopher proxy</title>\n" "</head>\n" "<body><pre>\n" diff --git a/phroxy.c b/phroxy.c @@ -214,7 +214,7 @@ htmlize(char *data, size_t *htmlsize) size_t alen, blen, hlen; char *html = NULL; char i, *p, *body, a[LINE_MAX], *f[4]; - char *fmt = "<a href='http://%s/%s:%s/%c%s'>%s</a><br/>\n"; + char *fmt = "<a href='http://%s/%s:%s/%c%s'>%s</a>\n"; blen = 0; body = NULL; @@ -235,7 +235,7 @@ htmlize(char *data, size_t *htmlsize) continue; switch(i) { case 'i': - snprintf(a, sizeof(a), "%s<br/>\n", f[0]); + snprintf(a, sizeof(a), "%s\n", f[0]); break; default: snprintf(a, sizeof(a), fmt, http_host, f[2], f[3], i, f[1], f[0]);