From 76ef8f9092fcac04c1d3c405b5719fdb79bc5987 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 18 Mar 2017 16:19:11 +0000 Subject: Bugfix: use SCRIPT_NAME for .Xr hyperlinks. Patch from . --- cgi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cgi.c b/cgi.c index e336a51d..9f73f918 100644 --- a/cgi.c +++ b/cgi.c @@ -839,7 +839,8 @@ resp_format(const struct req *req, const char *file) conf.fragment = 1; conf.style = mandoc_strdup(CSS_DIR "/mandoc.css"); usepath = strcmp(req->q.manpath, req->p[0]); - mandoc_asprintf(&conf.man, "/%s%s%%N.%%S", + mandoc_asprintf(&conf.man, "/%s%s%s%s%%N.%%S", + scriptname, *scriptname == '\0' ? "" : "/", usepath ? req->q.manpath : "", usepath ? "/" : ""); mparse_result(mp, &man, NULL); -- cgit