diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-03-18 16:19:11 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-03-18 16:19:11 +0000 |
commit | 76ef8f9092fcac04c1d3c405b5719fdb79bc5987 (patch) | |
tree | 43c5cd6d0fef20465c1557b7f75da105b5169e86 | |
parent | 4e452a40810358cef4533a02ac18776e562a62aa (diff) | |
download | mandoc-76ef8f9092fcac04c1d3c405b5719fdb79bc5987.tar.gz |
Bugfix: use SCRIPT_NAME for .Xr hyperlinks.
Patch from <andreas at AndreasVoegele dot com>.
-rw-r--r-- | cgi.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |