From 61ef0b75c67091679c5afae394c87a5d19e5b476 Mon Sep 17 00:00:00 2001
From: kroovy <
[email protected]>
Date: Wed, 9 Jul 2025 11:47:13 +0200
Subject: [PATCH] render images inline
---
gopherproxy.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/gopherproxy.c b/gopherproxy.c
index 7ffd60a..7ab2222 100644
--- a/gopherproxy.c
+++ b/gopherproxy.c
@@ -388,6 +388,18 @@ servedir(const char *server, const char *port, const char *path, const char *que
xmlencode(v.username);
fputs("</a>", stdout);
break;
+ case 'I': /* inline-image */
+ fputs(typestr(v._type), stdout);
+ fputs(" <a href=\"?q=", stdout);
+ encodeparam(uri);
+ fputs("\" target=\"_blank\">", stdout);
+
+ fputs("<img src=\"?q=", stdout);
+ encodeparam(uri);
+ fputs("\" width=400>", stdout);
+
+ fputs("</a>", stdout);
+ break;
default: /* other */
fputs(typestr(v._type), stdout);
fputs(" <a href=\"", stdout);
--
2.49.0