summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-12-14 11:28:05 -0500
committerStephen Beaver <sbeaver@netgate.com>2015-12-14 11:28:05 -0500
commit531338c40c5ece63e7b98b9f82a7ee5e213e5da3 (patch)
treecc8ea2f165745e022c225dc77ba731a380301f4b /src/usr/local/www
parent7f094976cf84a356b2f564ad10c7433dbf71c379 (diff)
parentfe70112bec9adc91a33a7e48a3dedf5a00ddb033 (diff)
downloadpfsense-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.php5
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)
OpenPOWER on IntegriCloud