From ffcf48b062f6f37207d6e3bbbcd46a6b30c7ebcc Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 25 Jul 2014 17:52:04 +0000 Subject: In generated .Xr links, avoid double encoding of ampersands and avoid empty arch= keys. --- cgi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cgi.c') diff --git a/cgi.c b/cgi.c index d219f307..ed69a7bb 100644 --- a/cgi.c +++ b/cgi.c @@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.86 2014/07/25 17:34:06 schwarze Exp $ */ +/* $Id: cgi.c,v 1.87 2014/07/25 17:52:04 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze @@ -874,8 +874,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); -- cgit v1.2.3