diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-07-25 17:51:34 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-07-25 17:51:34 +0000 |
commit | 92f06fa9b301b31186204d3eb09e47278efa52ce (patch) | |
tree | 6258f72ddae370ef71879527b004382c08c349e1 /usr.bin | |
parent | c45ca470ec4f2b83d8d66f806844bb812d551d9d (diff) |
In generated .Xr links, avoid double encoding of ampersands
and avoid empty arch= keys.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mandoc/cgi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mandoc/cgi.c b/usr.bin/mandoc/cgi.c index 613570c08bd..681be2b9415 100644 --- a/usr.bin/mandoc/cgi.c +++ b/usr.bin/mandoc/cgi.c @@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.26 2014/07/25 17:33:51 schwarze Exp $ */ +/* $Id: cgi.c,v 1.27 2014/07/25 17:51:33 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014 Ingo Schwarze <schwarze@usta.de> @@ -870,8 +870,9 @@ format(const struct req *req, const char *file) } snprintf(opts, sizeof(opts), "fragment,man=%s?" - "manpath=%s&query=%%N&sec=%%S&arch=%s", + "manpath=%s&query=%%N&sec=%%S%s%s", scriptname, req->q.manpath, + req->q.arch ? "&arch=" : "", req->q.arch ? req->q.arch : ""); mparse_result(mp, &mdoc, &man, NULL); |