]> granicus.if.org Git - php/commitdiff
Fix my stupid mistake which broke <form> handling
authorSascha Schumann <sas@php.net>
Mon, 30 Sep 2002 04:56:38 +0000 (04:56 +0000)
committerSascha Schumann <sas@php.net>
Mon, 30 Sep 2002 04:56:38 +0000 (04:56 +0000)
ext/standard/url_scanner_ex.re

index 7fddd803df7312777792766d223a066275657f4c..329fb2224561819067f2c383f2d65259bbd819a0 100644 (file)
@@ -199,16 +199,16 @@ static void handle_form(STD_PARA)
 
        if (ctx->form_app.len > 0) {
                switch (ctx->tag.len) {
+
+#define RECOGNIZE(x) do {      \
+       case sizeof(x)-1: \
+               if (strncasecmp(ctx->tag.c, x, sizeof(x)-1) == 0) \
+                       doit = 1; \
+               break; \
+} while (0)
                
-                       case sizeof("form")-1:
-                               if (strcasecmp(ctx->tag.c, "form") == 0)
-                                       doit = 1;
-                               break;
-
-                       case sizeof("fieldset")-1:
-                               if (strcasecmp(ctx->tag.c, "fieldset") == 0)
-                                       doit = 1;
-                               break;
+                       RECOGNIZE("form");
+                       RECOGNIZE("fieldset");
                }
 
                if (doit)