summaryrefslogtreecommitdiff
path: root/http/bin
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-06-09 19:46:34 +0100
committerJoe Carstairs <me@joeac.net>2026-06-09 19:46:34 +0100
commitda1670c57c9d27cc43dc19abb89f061ade9cb5e0 (patch)
treec44a43e8bf68861042032fb9856331a834fbc7f5 /http/bin
parent87dec12b01315b7b7cad045ba3ce1636d0c87315 (diff)
fixes links in gmi2upphtml
Diffstat (limited to 'http/bin')
-rw-r--r--[-rwxr-xr-x]http/bin/gmi2upphtml5
1 files changed, 3 insertions, 2 deletions
diff --git a/http/bin/gmi2upphtml b/http/bin/gmi2upphtml
index f19f447..b43693d 100755..100644
--- a/http/bin/gmi2upphtml
+++ b/http/bin/gmi2upphtml
@@ -118,8 +118,9 @@ do
if [ "$(echo "$line" | cut -c1-2)" = "=>" ]
then
close_all_open_blocks_except link
- href="$(escape_upphtml "$(echo "$line" | sed "s/^=>[[:space:]]*\([[:alnum:][:punct:]]\+\).*$/\1/")")"
- title="$(escape_upphtml "$(echo "$line" | sed "s/^=>[[:space:]]*[[:alnum:][:punct:]]\+[[:space:]]\(.*\)$/\1/")")"
+ href="$(escape_upphtml "$(echo "$line" | sed "s/^=>[[:space:]]\+//" | sed "s/[[:space:]]\+.*//")")"
+ title="$(escape_upphtml "${line#=> *${href}}")"
+ title="${title:-${href}}"
if [ $is_in_link_block -eq 0 ]
then
echo "<p>"