9cdc7abc79e1b7c67b25642639b4acc46a879d9f galt Tue Jul 10 17:21:13 2012 -0700 adding an exception for hidden db value outside form - argument has been made that such use is legal, and we cannot use htmlPage very well without it diff --git src/lib/htmlPage.c src/lib/htmlPage.c index 72cc347..ba6d142 100644 --- src/lib/htmlPage.c +++ src/lib/htmlPage.c @@ -1563,33 +1563,36 @@ hashAdd(outClose, buf, NULL); } /* Stream through tags making sure that insiders are * at least one deep inside of outsiders. */ for (tag = startTag; tag != NULL; tag = tag->next) { char *type = tag->name; if (hashLookup(outOpen, type )) ++depth; else if (hashLookup(outClose, type)) --depth; else if (hashLookup(inHash, type)) { if (depth <= 0) + { + if (!startsWith("<INPUT TYPE=HIDDEN NAME='db' VALUE='", tag->start)) // one exception hardwired tagAbort(page, tag, "%s outside of any of %s", type, outsiders); } } + } freeHash(&inHash); freeHash(&outOpen); freeHash(&outClose); freeMem(outDupe); freeMem(inDupe); } static void checkNest(struct htmlPage *page, char *type, struct htmlTag *startTag, struct htmlTag *endTag) /* Check that <type> and </type> tags are properly nested. */ { struct htmlTag *tag; int depth = 0; char endType[256]; safef(endType, sizeof(endType), "/%s", type);