diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-03-18 16:18:46 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-03-18 16:18:46 +0000 |
commit | 8c279c2589829fefec58c70e7dbea73200a311fd (patch) | |
tree | 50a71bff34c0e568bbd3b1f61e4b201a1a32e672 /usr.bin | |
parent | f97fa991a744f61e1310324dde3d427d6207456c (diff) |
Bugfix: use SCRIPT_NAME for .Xr hyperlinks.
Patch from <andreas at AndreasVoegele dot com>.
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 6b247bcf090..b9e56ee4000 100644 --- a/usr.bin/mandoc/cgi.c +++ b/usr.bin/mandoc/cgi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgi.c,v 1.89 2017/03/15 13:49:26 schwarze Exp $ */ +/* $OpenBSD: cgi.c,v 1.90 2017/03/18 16:18:45 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@usta.de> @@ -835,7 +835,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); |