← All changes
|
app/Services/FormBuilder/Components/TermsAndConditions.php
+3
-2
6.2.7
→
6.2.15
View file →
| @@ -39,13 +39,14 @@ | ||
| 39 | 39 | . ' ff-el-input--content' |
| 40 | 40 | ); |
| 41 | 41 | |
| 42 | 42 | $uniqueId = $this->getUniqueId($data['attributes']['name']); |
| 43 | + $escapedUniqueId = esc_attr($uniqueId); | |
| 43 | 44 | |
| 44 | 45 | $data['attributes']['id'] = $uniqueId; |
| 45 | 46 | $data['attributes']['class'] = trim( |
| 46 | 47 | 'ff-el-form-check-input ' . |
| 47 | - $data['attributes']['class'] | |
| 48 | + ArrayHelper::get($data, 'attributes.class', '') | |
| 48 | 49 | ); |
| 49 | 50 | |
| 50 | 51 | if ($tabIndex = Helper::getNextTabIndex()) { |
| 51 | 52 | $data['attributes']['tabindex'] = $tabIndex; |
| @@ -84,9 +85,9 @@ | ||
| 84 | 85 | $ariaLabel = wp_strip_all_tags($ariaLabel); |
| 85 | 86 | $ariaLabel = esc_attr($ariaLabel); |
| 86 | 87 | $html = "<div class='" . esc_attr($cls) . "'>"; |
| 87 | 88 | $html .= "<div class='ff-el-form-check ff-el-tc'>"; |
| 88 | - $html .= "<label aria-label='{$ariaLabel}' class='ff-el-form-check-label ff_tc_label' for={$uniqueId}>"; | |
| 89 | + $html .= "<label aria-label='{$ariaLabel}' class='ff-el-form-check-label ff_tc_label' for='{$escapedUniqueId}'>"; | |
| 89 | 90 | $html .= "{$checkbox} <div class='ff_t_c'>" . fluentform_sanitize_html($data['settings']['tnc_html']) . '</div>'; |
| 90 | 91 | $html .= '</label>'; |
| 91 | 92 | $html .= '</div>'; |
| 92 | 93 | $html .= '</div>'; |