Skip to content

Commit

Permalink
Use sanitize_html_class for html classes
Browse files Browse the repository at this point in the history
  • Loading branch information
douglas-johnson committed Sep 22, 2023
1 parent fea90ac commit 585354a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static function get_custom_block_wrapper_attributes( array $attributes ):
}

return array(
'class' => $default['class'] . ' ' . esc_attr( "has-text-align-{$text_align}" ),
'class' => $default['class'] . ' ' . sanitize_html_class( "has-text-align-{$text_align}" ),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public static function get_custom_block_wrapper_attributes( array $attributes ):
return array();
}
return array(
'class' => esc_attr( "has-text-align-{$text_align}" ),
'class' => sanitize_html_class( "has-text-align-{$text_align}" ),
);
}
}

0 comments on commit 585354a

Please sign in to comment.