diff options
| author | 2014-07-25 17:51:33 +0000 | |
|---|---|---|
| committer | 2014-07-25 17:51:33 +0000 | |
| commit | 4e874bf13f5eeb6476e54071b70fb380988f43e4 (patch) | |
| tree | 070f4f97d0d20f361c9f2825228772b0de9d31ae /usr.bin/mandoc/cgi.c | |
| parent | Add multiple-servers "virtual hosts" example. (diff) | |
| download | wireguard-openbsd-4e874bf13f5eeb6476e54071b70fb380988f43e4.tar.xz wireguard-openbsd-4e874bf13f5eeb6476e54071b70fb380988f43e4.zip | |
In generated .Xr links, avoid double encoding of ampersands
and avoid empty arch= keys.
Diffstat (limited to 'usr.bin/mandoc/cgi.c')
| -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); |
