tSimplify formatting using inline CSS by default - phroxy - Gopher to HTTP proxy
(HTM) git clone git://git.z3bra.org/phroxy.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit e133739f4bb2117d8e6389ab5a7ce83291131410
(DIR) parent b7b6e2df588288393b4b643fe6d8c860085195ac
(HTM) Author: Willy Goiffon <dev@z3bra.org>
Date: Mon, 14 Sep 2020 13:58:35 +0200
Simplify formatting using inline CSS by default
Diffstat:
M config.def.h | 2 +-
M phroxy.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/config.def.h b/config.def.h
t@@ -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"
(DIR) diff --git a/phroxy.c b/phroxy.c
t@@ -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;
t@@ -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]);