Improved Gopher entry support

This commit is contained in:
Luxferre
2024-10-06 23:19:06 +03:00
parent 6a0c127e1b
commit 351cfaa26f
2 changed files with 13 additions and 3 deletions
+12 -2
View File
@@ -589,7 +589,17 @@ proc render_handler_gopher {prevurl rooturl path body textw} {
0 -
1 -
5 -
9 { # plain text, gophermap, binary
g -
I -
: -
; -
< -
d -
p -
s -
P -
X -
9 { # plain text, gophermap, binary, image, sound...
linkinsert $textw $prevurl $rooturl "$tscheme://$rhost:$rport/$rtype$rsel" $rdesc "" preformatter
}
7 { # gophermap with input
@@ -613,7 +623,7 @@ proc render_handler_gopher {prevurl rooturl path body textw} {
default {}
}
}
} elseif {($gophertype eq 5) || ($gophertype eq 9)} {
} elseif {($gophertype ne 0) && ($gophertype ne 3)} {
$textw insert end $body preformatter
} else {
$textw insert end [textsanitize $body] preformatter