Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowed HTML in Component class #390

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion includes/MslsAdminIcon.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace lloc\Msls;

use lloc\Msls\Component\Component;
use lloc\Msls\Component\Icon\IconSvg;
use lloc\Msls\Component\Icon\IconLabel;

Expand Down Expand Up @@ -242,7 +243,7 @@ public function get_icon(): string {
$icon = sprintf(
'<span class="language-badge %s">%s</span>',
esc_attr( $this->language ),
wp_kses( $text, array( 'span' => array() ) )
wp_kses( $text, Component::get_allowed_html() )
);
break;
default:
Expand Down
4 changes: 3 additions & 1 deletion includes/MslsPostTagClassic.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace lloc\Msls;

use lloc\Msls\Component\Component;

/**
* Post Tag Classic
*
Expand Down Expand Up @@ -77,7 +79,7 @@ public function the_input( ?\WP_Term $tag, string $title_format, string $item_fo

$this->maybe_set_linked_term( $mydata );

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

foreach ( $blogs as $blog ) {
$this->print_option( $blog, $type, $mydata, $item_format );
Expand Down
Loading