From f11372be0b649dd13ffa86c4c610c0ffb903849b Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 18 Mar 2017 16:19:11 +0000 Subject: [PATCH] Bugfix: use SCRIPT_NAME for .Xr hyperlinks. Patch from . --- cgi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cgi.c b/cgi.c index cfb779c2..d1d1199e 100644 --- a/cgi.c +++ b/cgi.c @@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.151 2017/03/15 13:49:50 schwarze Exp $ */ +/* $Id: cgi.c,v 1.152 2017/03/18 16:19:11 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze @@ -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); -- 2.47.1