diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-12-14 11:28:05 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-12-14 11:28:05 -0500 |
commit | 531338c40c5ece63e7b98b9f82a7ee5e213e5da3 (patch) | |
tree | cc8ea2f165745e022c225dc77ba731a380301f4b /src/usr/local/www | |
parent | 7f094976cf84a356b2f564ad10c7433dbf71c379 (diff) | |
parent | fe70112bec9adc91a33a7e48a3dedf5a00ddb033 (diff) | |
download | pfsense-531338c40c5ece63e7b98b9f82a7ee5e213e5da3.zip pfsense-531338c40c5ece63e7b98b9f82a7ee5e213e5da3.tar.gz |
Merge pull request #2215 from NOYB/HTML_Compliance_-_Form_Action_Attribute
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/classes/Form.class.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/usr/local/www/classes/Form.class.php b/src/usr/local/www/classes/Form.class.php index 7964d12..6f30f69 100644 --- a/src/usr/local/www/classes/Form.class.php +++ b/src/usr/local/www/classes/Form.class.php @@ -35,8 +35,6 @@ class Form extends Form_Element protected $_attributes = array( 'class' => array('form-horizontal' => true), 'method' => 'post', - // Empty is interpreted by all browsers to submit to the current URI - 'action' => '', ); protected $_sections = array(); protected $_global = array(); @@ -54,6 +52,9 @@ class Form extends Form_Element if (false !== $submit) $this->addGlobal($submit); + + if (!isset($this->_attributes['action'])) + $this->_attributes['action'] = htmlspecialchars($_SERVER['REQUEST_URI']); } public function add(Form_Section $section) |