Skip to content

Commit

Permalink
Kses fixes for permitting some tags
Browse files Browse the repository at this point in the history
  • Loading branch information
artpi committed May 22, 2019
1 parent e4dcb10 commit f704917
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion modules/memberships/class-jetpack-memberships.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ class Jetpack_Memberships {
* @var string
*/
private static $button_block_name = 'membership-button';

/**
* These are defaults for wp_kses ran on the membership button.
*
* @var array
*/
private static $tags_allowed_in_the_button = array(
'br' => array(),
'em' => array(),
'strong' => array(),
'p' => array(),
'img' => array(
'src' => array(),
),
);
/**
* Classic singleton pattern
*
Expand Down Expand Up @@ -243,7 +258,7 @@ public function render_button( $attrs ) {
esc_attr( get_locale() ),
esc_attr( implode( $classes, ' ' ) ),
esc_attr( $button_styles ),
esc_html( $data['button_label'] )
wp_kses( $data['button_label'], self::$tags_allowed_in_the_button )
);
}

Expand Down

0 comments on commit f704917

Please sign in to comment.