Skip to content

Commit

Permalink
Fix: sanitize shortcode atts (#7379)
Browse files Browse the repository at this point in the history
Co-authored-by: Ante Laca <[email protected]>
  • Loading branch information
alaca authored May 3, 2024
1 parent 8ce4f20 commit b27becd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions includes/class-give-donate-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,11 @@ public function get_form_classes( $args ) {
// Remove empty class names.
$form_classes_array = array_filter( $form_classes_array );

/**
* @unreleased sanitize attributes
*/
$form_classes_array = array_map('esc_attr', $form_classes_array);

return implode( ' ', $form_classes_array );

}
Expand Down Expand Up @@ -885,6 +890,11 @@ public function get_form_wrap_classes( $args ) {
*/
$form_wrap_classes_array = (array) apply_filters( 'give_form_wrap_classes', $custom_class, $this->ID, $args );

/**
* @unreleased sanitize attributes
*/
$form_wrap_classes_array = array_map('esc_attr', $form_wrap_classes_array);

return implode( ' ', $form_wrap_classes_array );

}
Expand Down

0 comments on commit b27becd

Please sign in to comment.