Skip to content

Commit

Permalink
Fixed XSS issue.
Browse files Browse the repository at this point in the history
props @foobar7
  • Loading branch information
barrykooij committed Oct 1, 2022
1 parent a6fb4dc commit 269e0a4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions classes/hooks/class-hook-link-related-screen.php
Expand Up @@ -54,7 +54,7 @@ private function catch_search() {
exit;
}
}

/**
* Check if the current user is allowed to create related posts
*/
Expand Down Expand Up @@ -151,7 +151,7 @@ public function content() {
}

// Parent
$parent = $_GET['rp4wp_parent'];
$parent = absint( $_GET['rp4wp_parent'] );

// Setup cancel URL
$cancel_url = get_admin_url() . "post.php?post={$parent}&action=edit";
Expand All @@ -166,7 +166,7 @@ public function content() {
<div class="wrap">
<h2>
<?php _e( 'Posts', 'related-posts-for-wp' ); ?>
<a href="<?php echo $cancel_url; ?>" class="add-new-h2"><?php _e( 'Cancel linking', 'related-posts-for-wp' ); ?></a>
<a href="<?php echo esc_attr( $cancel_url ); ?>" class="add-new-h2"><?php _e( 'Cancel linking', 'related-posts-for-wp' ); ?></a>
</h2>

<form id="sp-list-table-form" method="post">
Expand All @@ -192,4 +192,4 @@ public function content() {

<?php
}
}
}

0 comments on commit 269e0a4

Please sign in to comment.