]> Sergey Matveev's repositories - public-inbox.git/commitdiff
searchview: fix mbox.gz downloads for lynx users
authorEric Wong <e@80x24.org>
Sat, 22 Aug 2020 00:41:25 +0000 (00:41 +0000)
committerEric Wong <e@yhbt.net>
Sat, 22 Aug 2020 05:33:18 +0000 (05:33 +0000)
Unlike w3m and links, the lynx browser seems to require a `name'
attribute for `<input type=submit>' elements.  Maybe some other
browsers do, too.  The `name' attribute for submit elements
doesn't seem to cause any harm for w3m or links, users, either;
despite not (AFAIK) being part of historical or current HTML
specs.

lib/PublicInbox/SearchView.pm

index aa8fa037843741337850645dc25c5488fc730f01..75e2d39dfe3057ca6e94c6b1e21b7bf24591e073 100644 (file)
@@ -185,9 +185,11 @@ sub search_nav_top {
                $rv .= qq{<a\nhref="?$s">summary</a>|<b>nested</b>};
        }
        my $A = $q->qs_html(x => 'A', r => undef);
-       $rv .= qq{|<a\nhref="?$A">Atom feed</a>]};
-       $rv .= qq{\n\t\t\t\t\t\tdownload: };
-       $rv .= qq{<input\ntype=submit\nvalue="mbox.gz"/></pre></form><pre>};
+       $rv .= qq{|<a\nhref="?$A">Atom feed</a>]} .
+               qq{\n\t\t\t\t\t\tdownload: } .
+               # lynx seems to require a name=, here, so just use 'z'
+               qq{<input\ntype=submit\nname=z\nvalue="mbox.gz"/>} .
+               q{</pre></form><pre>};
 }
 
 sub search_nav_bot {