Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,16 @@
<select id="bp-groups-type" name="group-types[]" autocomplete="off">
<option value="" <?php selected( '', '' ); ?>><?php esc_html_e( 'Select Group Type', 'buddyboss' ); ?></option>
<?php
// `wp_kses_post()` strips `<option>`/`<select>` as they're not part of the post-content
// allowed-tags list, so a dedicated allowlist is used instead to keep these options intact.
$group_type_option_allowed_html = array(
'option' => array(
'for' => true,
'value' => true,
'selected' => true,
),
);

foreach ( $group_types as $group_type ) :

$group_option = sprintf(
Expand Down Expand Up @@ -249,19 +259,19 @@

if ( ! empty( $include_group_type ) ) {
if ( in_array( $group_type->name, $include_group_type, true ) ) {
echo wp_kses_post( $group_option );
echo wp_kses( $group_option, $group_type_option_allowed_html );
}
} else {
echo wp_kses_post( $group_option );
echo wp_kses( $group_option, $group_type_option_allowed_html );
}
} else {
echo wp_kses_post( $group_option );
echo wp_kses( $group_option, $group_type_option_allowed_html );
}
} else {
echo wp_kses_post( $group_option );
echo wp_kses( $group_option, $group_type_option_allowed_html );
}
} else {
echo wp_kses_post( $group_option );
echo wp_kses( $group_option, $group_type_option_allowed_html );
}
endforeach;
?>
Expand Down
Loading