version 1.153, 2017/03/18 16:48:24 |
version 1.156, 2017/06/24 14:38:32 |
Line 140 html_putchar(char c) |
|
Line 140 html_putchar(char c) |
|
{ |
{ |
|
|
switch (c) { |
switch (c) { |
case ('"'): |
case '"': |
printf("""); |
printf("""); |
break; |
break; |
case ('&'): |
case '&': |
printf("&"); |
printf("&"); |
break; |
break; |
case ('>'): |
case '>': |
printf(">"); |
printf(">"); |
break; |
break; |
case ('<'): |
case '<': |
printf("<"); |
printf("<"); |
break; |
break; |
default: |
default: |
Line 832 resp_format(const struct req *req, const char *file) |
|
Line 832 resp_format(const struct req *req, const char *file) |
|
|
|
mchars_alloc(); |
mchars_alloc(); |
mp = mparse_alloc(MPARSE_SO | MPARSE_UTF8 | MPARSE_LATIN1, |
mp = mparse_alloc(MPARSE_SO | MPARSE_UTF8 | MPARSE_LATIN1, |
MANDOCLEVEL_BADARG, NULL, req->q.manpath); |
MANDOCERR_MAX, NULL, MANDOC_OS_OTHER, req->q.manpath); |
mparse_readfd(mp, fd, file); |
mparse_readfd(mp, fd, file); |
close(fd); |
close(fd); |
|
|
|
|
|
|
if (*path != '\0') { |
if (*path != '\0') { |
parse_path_info(&req, path); |
parse_path_info(&req, path); |
if (req.q.manpath == NULL || access(path, F_OK) == -1) |
if (req.q.manpath == NULL || req.q.sec == NULL || |
|
*req.q.query == '\0' || access(path, F_OK) == -1) |
path = ""; |
path = ""; |
} else if ((querystring = getenv("QUERY_STRING")) != NULL) |
} else if ((querystring = getenv("QUERY_STRING")) != NULL) |
parse_query_string(&req, querystring); |
parse_query_string(&req, querystring); |