Skip to content

Commit 6da2f00

Browse files
committed
fix: escape title output to prevent XSS
1 parent 3aabbe5 commit 6da2f00

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/block/posts/index.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ function generate_render_item_from_stackable_posts_block( $post, $attributes, $t
5858
if ( empty( $title ) ) {
5959
$title = __( '(Untitled)', STACKABLE_I18N );
6060
}
61+
62+
// Escape title output to prevent XSS
63+
$title = esc_html( $title );
64+
6165
$new_template = str_replace( '!#title!#', $title, $new_template );
6266
}
6367

0 commit comments

Comments
 (0)