Skip to content

Commit

Permalink
fix: escape html tag in posts grid widget
Browse files Browse the repository at this point in the history
  • Loading branch information
girishpanchal30 committed Jan 27, 2025
1 parent 52f8dc5 commit c2a184d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1638,8 +1638,9 @@ protected function renderTitle() {
$settings = $this->get_settings();

if ( $settings['grid_title_hide'] !== 'yes' ) {
$tag = in_array( $settings['grid_title_tag'], array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p' ), true ) ? $settings['grid_title_tag'] : 'h1';
?>
<<?php echo $settings['grid_title_tag']; ?> class="entry-title obfx-grid-title">
<<?php echo $tag; ?> class="entry-title obfx-grid-title">
<?php if ( $settings['grid_title_link'] == 'yes' ) { ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_title(); ?>
Expand All @@ -1649,7 +1650,7 @@ protected function renderTitle() {
the_title();
}
?>
</<?php echo $settings['grid_title_tag']; ?>>
</<?php echo $tag; ?>>
<?php
}
}
Expand Down

0 comments on commit c2a184d

Please sign in to comment.