Skip to content
Snippets Groups Projects
Commit 7dfce451 authored by Anika Henke's avatar Anika Henke
Browse files

Fix buttons with invalid empty name attributes

The search buttons from the search form on the top of the page
as well as the search page both produce invalid HTML
due to the name attribute being empty.
As the name is required for each of the PHP functions
producing the buttons and is passed as an empty string,
this makes sure that parameters with empty strings get skipped.
parent 75c3272a
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@ class ButtonElement extends Element {
* @return string
*/
public function toHTML() {
return '<button ' . buildAttributes($this->attrs()) . '>'.$this->content.'</button>';
return '<button ' . buildAttributes($this->attrs(), true) . '>'.$this->content.'</button>';
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment