9367c4abbf200b833b19c5fe77a198c41a48c809 galt Fri Feb 24 18:29:08 2017 -0800 Adding new function strictTagNestCheck to htmlCheck. CSP testing turned up CGI webpage output that was not even being parsed correctly or the same by various browsers because of reversed end-tags. htmlCheck should be able to find these problems too. Also added the pipe and comma chars to the chars allowed in urls by htmlPage.c diff --git src/inc/htmlPage.h src/inc/htmlPage.h index b2238ae..91cc9c6 100644 --- src/inc/htmlPage.h +++ src/inc/htmlPage.h @@ -194,30 +194,33 @@ struct slName *htmlPageScanAttribute(struct htmlPage *page, char *tagName, char *attribute); /* Scan page for values of particular attribute in particular tag. * if tag is NULL then scans in all tags. */ struct slName *htmlPageLinks(struct htmlPage *page); /* Scan through tags list and pull out HREF attributes. */ void htmlPageFormOrAbort(struct htmlPage *page); /* Aborts if no FORM found */ void htmlPageValidateOrAbort(struct htmlPage *page); /* Do some basic validations. Aborts if there is a problem. */ +void htmlPageStrictTagNestCheck(struct htmlPage *page); +/* Do strict tag nesting check. Aborts if there is a problem. */ + char *htmlSlurpWithCookies(char *url, struct htmlCookie *cookies); /* Send get message to url with cookies, and return full response as * a dyString. This is not parsed or validated, and includes http * header lines. Typically you'd pass this to htmlPageParse() to * get an actual page. */ struct htmlPage *htmlPageParse(char *url, char *fullText); /* Parse out page and return. Warn and return NULL if problem. */ struct htmlPage *htmlPageParseOk(char *url, char *fullText); /* Parse out page and return only if status ok. */ struct htmlPage *htmlPageParseNoHead(char *url, char *htmlText); /* Parse out page in memory (past http header if any) and return. */