Skip to content

Commit

Permalink
Forms block: fix checkbox field italics+bold rendering (#41170)
Browse files Browse the repository at this point in the history
  • Loading branch information
enejb authored Jan 20, 2025
1 parent b816b8e commit 485f5e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Minor fix


Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ public function render_checkbox_field( $id, $label, $value, $class, $required, $
$field = "<div class='contact-form__checkbox-wrap'>";
$field .= "<input id='" . esc_attr( $id ) . "' type='checkbox' name='" . esc_attr( $id ) . "' value='" . esc_attr__( 'Yes', 'jetpack-forms' ) . "' " . $class . checked( (bool) $value, true, false ) . ' ' . ( $required ? "required aria-required='true'" : '' ) . "/> \n";
$field .= "<label for='" . esc_attr( $id ) . "' class='grunion-field-label checkbox" . ( $this->is_error() ? ' form-error' : '' ) . "' style='" . $this->label_styles . "'>";
$field .= esc_html( $label ) . ( $required ? '<span class="grunion-label-required" aria-hidden="true">' . $required_field_text . '</span>' : '' );
$field .= wp_kses_post( $label ) . ( $required ? '<span class="grunion-label-required" aria-hidden="true">' . $required_field_text . '</span>' : '' );
$field .= "</label>\n";
$field .= "<div class='clear-form'></div>\n";
$field .= '</div>';
Expand All @@ -717,7 +717,7 @@ private function render_consent_field( $id, $class ) {
} else {
$field .= "\t\t<input type='checkbox' name='" . esc_attr( $id ) . "' value='" . esc_attr__( 'Yes', 'jetpack-forms' ) . "' " . $class . "/> \n";
}
$field .= "\t\t" . esc_html( $consent_message );
$field .= "\t\t" . wp_kses_post( $consent_message );
$field .= "</label>\n";
$field .= "<div class='clear-form'></div>\n";
return $field;
Expand Down

0 comments on commit 485f5e9

Please sign in to comment.