From aa996843ce51296d09a14b11a63d6003be62c33b Mon Sep 17 00:00:00 2001
From: Piotr Po <potreb@gmail.com>
Date: Mon, 30 Nov 2020 09:11:53 +0100
Subject: [PATCH] fix(attributes): fixed bug with the double name & type
 attribute

---
 changelog.txt                       | 4 ++++
 src/Field/Traits/HtmlAttributes.php | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/changelog.txt b/changelog.txt
index 9dd3429..e8739c0 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,5 +1,9 @@
 # Changelog
 
+## [2.3.2] - 2020-11-30
+### Fixed
+- Fixed bug with the double name & type attribute
+
 ## [2.3.1] - 2020-10-20
 ### Fixed
 - JsonNormalizedRenderer now renders only fields that can be converted to json
diff --git a/src/Field/Traits/HtmlAttributes.php b/src/Field/Traits/HtmlAttributes.php
index b336ef7..df4f760 100644
--- a/src/Field/Traits/HtmlAttributes.php
+++ b/src/Field/Traits/HtmlAttributes.php
@@ -19,7 +19,7 @@ trait HtmlAttributes {
 	 *
 	 * @return string[]
 	 */
-	public function get_attributes( $except = [] ) {
+	public function get_attributes( $except = [ 'name', 'type' ] ) {
 		return array_filter( $this->attributes, function ( $value, $key ) use ( $except ) {
 			return ! in_array( $key, $except, true );
 		}, ARRAY_FILTER_USE_BOTH );
-- 
GitLab