diff options
author | Michael Sweet <michael.r.sweet@gmail.com> | 2017-12-18 21:29:42 -0500 |
---|---|---|
committer | Michael Sweet <michael.r.sweet@gmail.com> | 2017-12-18 21:29:42 -0500 |
commit | 5e1c3dff006f26f2c785a1221b85e04ac19ac14a (patch) | |
tree | dc91fe6312f5f37a0ac16dc67098dcc3d494e1f8 /cgi-bin | |
parent | 9e44dfbe6cb61d44feb60a85b28abf9f5647c6e3 (diff) | |
download | cups-5e1c3dff006f26f2c785a1221b85e04ac19ac14a.tar.gz |
Support <body> being indented.
Diffstat (limited to 'cgi-bin')
-rw-r--r-- | cgi-bin/help.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cgi-bin/help.c b/cgi-bin/help.c index 8f6aa5499..faa1993d6 100644 --- a/cgi-bin/help.c +++ b/cgi-bin/help.c @@ -329,20 +329,22 @@ main(int argc, /* I - Number of command-line arguments */ if ((fp = cupsFileOpen(filename, "r")) != NULL) { int inbody; /* Are we inside the body? */ - + char *lineptr; /* Pointer into line */ inbody = 0; while (cupsFileGets(fp, line, sizeof(line))) { + for (lineptr = line; *lineptr && isspace(*lineptr & 255); lineptr ++); + if (inbody) { - if (!_cups_strncasecmp(line, "</BODY>", 7)) + if (!_cups_strncasecmp(lineptr, "</BODY>", 7)) break; printf("%s\n", line); } - else if (!_cups_strncasecmp(line, "<BODY", 5)) + else if (!_cups_strncasecmp(lineptr, "<BODY", 5)) inbody = 1; } |