sas Wed Sep 25 07:06:24 2002 EDT
Modified files:
/php4/ext/standard url_scanner_ex.re
/php4 php.ini-dist
Log:
Fix #13472 by making it possible to append the <input> stuff after
<fieldset> for xhtml compliance.
Index: php4/ext/standard/url_scanner_ex.re
diff -u php4/ext/standard/url_scanner_ex.re:1.60
php4/ext/standard/url_scanner_ex.re:1.61
--- php4/ext/standard/url_scanner_ex.re:1.60 Wed Sep 25 06:35:28 2002
+++ php4/ext/standard/url_scanner_ex.re Wed Sep 25 07:06:23 2002
@@ -81,7 +81,7 @@
}
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
@@ -180,14 +180,35 @@
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
Index: php4/php.ini-dist
diff -u php4/php.ini-dist:1.155 php4/php.ini-dist:1.156
--- php4/php.ini-dist:1.155 Mon Sep 23 14:12:38 2002
+++ php4/php.ini-dist Wed Sep 25 07:06:24 2002
@@ -104,11 +104,11 @@
; 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
@@ -836,7 +836,7 @@
; 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.
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php