Skip to content

Commit 05ec26c

Browse files
authored
Merge pull request #390 from lloc/raise-coverage
Allowed HTML in Component class
2 parents 00855cd + 2fab08a commit 05ec26c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

includes/MslsAdminIcon.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace lloc\Msls;
44

5+
use lloc\Msls\Component\Component;
56
use lloc\Msls\Component\Icon\IconSvg;
67
use lloc\Msls\Component\Icon\IconLabel;
78

@@ -242,7 +243,7 @@ public function get_icon(): string {
242243
$icon = sprintf(
243244
'<span class="language-badge %s">%s</span>',
244245
esc_attr( $this->language ),
245-
wp_kses( $text, array( 'span' => array() ) )
246+
wp_kses( $text, Component::get_allowed_html() )
246247
);
247248
break;
248249
default:

includes/MslsPostTagClassic.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace lloc\Msls;
44

5+
use lloc\Msls\Component\Component;
6+
57
/**
68
* Post Tag Classic
79
*
@@ -77,7 +79,7 @@ public function the_input( ?\WP_Term $tag, string $title_format, string $item_fo
7779

7880
$this->maybe_set_linked_term( $mydata );
7981

80-
printf( wp_kses( $title_format ), esc_html( $this->get_select_title() ) );
82+
printf( wp_kses( $title_format, Component::get_allowed_html() ), esc_html( $this->get_select_title() ) );
8183

8284
foreach ( $blogs as $blog ) {
8385
$this->print_option( $blog, $type, $mydata, $item_format );

0 commit comments

Comments
 (0)