Fixed record selection on pages using non-numeric selectors with simple_page_mode...
[fa-stable.git] / includes / ui / ui_controls.inc
index 217be194c3642061fa15fc7b5085deac3fda3106..c9bae54f55133455af9b2abbbdee89584545512f 100644 (file)
@@ -165,8 +165,13 @@ function delete_link_cell($param, $title=false)
 
 function edit_button_cell($name, $value, $title=false)
 {
-    label_cell("<input type=\"submit\" class=\"editbutton\" name=\"$name\" value=\"$value\""
-       .($title ? " title='$title'":'')." />\n");
+// php silently changes dots,spaces,'[' and characters 128-159
+// to underscore in POST names, to maintain compatibility with register_globals
+
+    label_cell("<input type=\"submit\" class=\"editbutton\" name=\""
+               .htmlentities(strtr($name, array('.'=>'=2E',' '=>'=20','='=>'=3D','['=>'=5B')))
+               ."\" value=\"$value\""
+               .($title ? " title='$title'":'')." />\n");
 }
 
 //-----------------------------------------------------------------------------------