From da1670c57c9d27cc43dc19abb89f061ade9cb5e0 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Tue, 9 Jun 2026 19:46:34 +0100 Subject: [PATCH] fixes links in gmi2upphtml --- http/bin/gmi2upphtml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) mode change 100755 => 100644 http/bin/gmi2upphtml diff --git a/http/bin/gmi2upphtml b/http/bin/gmi2upphtml old mode 100755 new mode 100644 index f19f447..b43693d --- 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 "

"