diff options
Diffstat (limited to 'lib/PublicInbox/SearchView.pm')
-rw-r--r-- | lib/PublicInbox/SearchView.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index 8f61b4f4..746cb838 100644 --- a/lib/PublicInbox/SearchView.pm +++ b/lib/PublicInbox/SearchView.pm @@ -35,7 +35,7 @@ sub sres_top_html { my $res = html_start($q, $ctx) . '<pre>'; if ($err) { $code = 400; - $res .= err_txt($err) . "</pre><hr /><pre>" . foot($ctx); + $res .= err_txt($ctx, $err) . "</pre><hr /><pre>" . foot($ctx); } elsif ($total == 0) { $code = 404; $res .= "\n\n[No results found]</pre><hr /><pre>".foot($ctx); @@ -80,8 +80,9 @@ sub dump_mset { } sub err_txt { - my ($err) = @_; - my $u = 'http://xapian.org/docs/queryparser.html'; + my ($ctx, $err) = @_; + my $u = '//xapian.org/docs/queryparser.html'; + $u = PublicInbox::Hval::prurl($ctx->{cgi}->{env}, $u); $err =~ s/^\s*Exception:\s*//; # bad word to show users :P $err = PublicInbox::Hval->new_oneline($err)->as_html; "\n\nBad query: <b>$err</b>\n" . |