← All changes
|
app/Services/FormBuilder/Components/BaseComponent.php
+4
-0
6.2.2
→
6.2.15
View file →
| @@ -2,8 +2,9 @@ | ||
| 2 | 2 | |
| 3 | 3 | namespace FluentForm\App\Services\FormBuilder\Components; |
| 4 | 4 | |
| 5 | 5 | use FluentForm\Framework\Helpers\ArrayHelper; |
| 6 | +use FluentForm\App\Services\FormBuilder\AutocompleteTokens; | |
| 6 | 7 | use FluentForm\App\Modules\Component\Component; |
| 7 | 8 | use FluentForm\Framework\Support\Helper; |
| 8 | 9 | use stdClass; |
| 9 | 10 | |
| @@ -54,9 +55,12 @@ | ||
| 54 | 55 | protected function buildAttributes($attributes, $form = null) |
| 55 | 56 | { |
| 56 | 57 | $atts = ''; |
| 57 | 58 | |
| 59 | + $attributes = AutocompleteTokens::normalizeAttributes($attributes); | |
| 60 | + | |
| 58 | 61 | foreach ($attributes as $key => $value) { |
| 62 | + | |
| 59 | 63 | if ($value || 0 === $value || '0' === $value) { |
| 60 | 64 | $value = htmlspecialchars($value); |
| 61 | 65 | $atts .= esc_attr($key) . '="' . $value . '" '; |
| 62 | 66 | } |