}
PHP_INI_BEGIN()
- STD_PHP_INI_ENTRY("url_rewriter.tags", "a=href,area=href,frame=src,form=fakeentry", PHP_INI_ALL, OnUpdateTags, url_adapt_state_ex, php_basic_globals, basic_globals)
+ STD_PHP_INI_ENTRY("url_rewriter.tags", "a=href,area=href,frame=src,form=,fieldset=", PHP_INI_ALL, OnUpdateTags, url_adapt_state_ex, php_basic_globals, basic_globals)
PHP_INI_END()
/*!re2c
smart_str_appendl(&ctx->result, start, YYCURSOR - start);
}
-static inline void handle_form(STD_PARA)
+/*
+ * This function appends a hidden input field after a <form> or
+ * <fieldset>. The latter is important for XHTML.
+ */
+
+static void handle_form(STD_PARA)
{
- if (ctx->form_app.len > 0
- && ctx->tag.len == 4
- && strncasecmp(ctx->tag.c, "form", 4) == 0) {
- smart_str_append(&ctx->result, &ctx->form_app);
+ int doit = 0;
+
+ if (ctx->form_app.len > 0) {
+ switch (ctx->tag.len) {
+
+ 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;
+ }
+
+ if (doit)
+ smart_str_append(&ctx->result, &ctx->form_app);
}
}
+
+
/*
* HANDLE_TAG copies the HTML Tag and checks whether we
* have that tag in our table. If we might modify it,
; Valid values for this option are 'off', 'on', or a specific buffer size
; to be used for compression (default is 4KB)
; Note: Resulting chunk size may vary due to nature of compression. PHP
-; outputs chunks that are few handreds bytes each as a result of compression.
-; If you want larger chunk size for better performence, enable output_buffering
-; also.
-; Note: output_handler must be empty if this is set 'On' !!!!
-; Instead you must use zlib.output_handler.
+; outputs chunks that are few hundreds bytes each as a result of
+; compression. If you prefer a larger chunk size for better
+; performance, enable output_buffering in addition.
+; Note: You need to use zlib.output_handler instead of the standard
+; output_handler, or otherwise the output will be corrupted.
zlib.output_compression = Off
; You cannot specify additional output handlers if zlib.output_compression
; always using URL stored in browser's history or bookmarks.
session.use_trans_sid = 0
-url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
+url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
[MSSQL]
; Allow or prevent persistent links.