Skip to content

Commit

Permalink
Escape and absint
Browse files Browse the repository at this point in the history
  • Loading branch information
borkweb committed Dec 3, 2021
1 parent 9c2d338 commit fb9dcae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions output/gigpress_sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function form( $instance ) {

<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'related' ) ); ?>">
<?php _e( 'Only display shows related to this post', 'gigpress' ); ?>
<?php esc_html_e( 'Only display shows related to this post', 'gigpress' ); ?>
</label>
<select style="width:100%;" id="<?php echo esc_attr( $this->get_field_id( 'related' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'related' ) ); ?>">
<option value="">--</option>
Expand All @@ -177,7 +177,7 @@ function form( $instance ) {
if ( $posts != false ) :
foreach ( $posts as $this_post ) :
?>
<option value="<?php echo absint( $this_post->ID ); ?>" <?php echo ( $related == $this_post->ID ) ? 'selected="selected"' : ''; ?>>
<option value="<?php echo absint( $this_post->ID ); ?>" <?php echo ( absint( $related ) === $this_post->ID ) ? 'selected="selected"' : ''; ?>>
<?php echo esc_html( get_the_title( $this_post ) ); ?>
</option>
<?php endforeach; ?>
Expand Down

0 comments on commit fb9dcae

Please sign in to comment.