From 7255680e130274fbb31b61a0ebc916767a773eab Mon Sep 17 00:00:00 2001 From: Nathan Angelacos Date: Wed, 21 Nov 2007 20:17:51 +0000 Subject: Scott's fix for bare html before a <% comment tag Added TODO item to split FORM into COOKIE, GET, POST --- TODO | 10 ++++------ src/h_script.c | 6 ++++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index bc820ce..66dcf4a 100644 --- a/TODO +++ b/TODO @@ -1,14 +1,12 @@ +20 Nov 2007 +* Add option to separate FORM into COOKIE, GET, POST tables +* Make it easier for people like Scott to make new haserl tags +* Release a 0.10.0 or 1.0.0 version already 12 Jul 2007 -* integrate the rest of timo's suggestions * combine all the llist stuff into one generic library. (save space) -* Redo the whole bash shell thing; just dump and wait, rather than - the echo at the end. * For some reason, thttpd sometimes returns short reads, then as a final insult, leaves stdin open without having any more data to feed to the script. This causes haserl to hang. Either investigate thttpd or warn not to use it. 6 Feb 2007 -* Compile the haserl startup code into the binary, rather than having -h_luascript.c use uncompiled source. - * Investigate fastcgi for the lua version of haserl diff --git a/src/h_script.c b/src/h_script.c index 541e379..218792d 100644 --- a/src/h_script.c +++ b/src/h_script.c @@ -253,6 +253,12 @@ build_token_list (script_t * scriptbuf, token_t * tokenlist) /* if this is a comment tag, the end is at the end of the comment */ if ((start) && (memcmp (start + 2, g_tag[COMMENT], 1) == 0)) { + /* save any bare html before the comment */ + curtoken = push_token_on_list (curtoken, scriptbuf, curpos, + start - curpos); + if (firsttoken == NULL) + firsttoken = curtoken; + /* push start of token to end of token */ end = skip_comment (start, endpos); if (end) { -- cgit v1.2.3