Skip to content

Commit

Permalink
Authenticated(Editor+) Stored Cross-Site Scripting
Browse files Browse the repository at this point in the history
  • Loading branch information
samiahmedsiddiqui committed Aug 20, 2024
1 parent 1572bdc commit caf4d6c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions admin/class-custom-permalinks-post-types-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,13 @@ protected function column_title( $item ) {
}

$edit_link = get_edit_post_link( $item['ID'] );
$title_with_edit_link = $post_title;
$title_with_edit_link = esc_html( $post_title );
if ( ! empty( $edit_link ) ) {
$title_with_edit_link = sprintf(
'<a href="%s" target="_blank" title="' . esc_html__( 'Edit ', 'custom-permalinks' ) . ' ' . $post_title . '">%s</a>',
'<a href="%1s" target="_blank" title="' . esc_attr__( 'Edit', 'custom-permalinks' ) . ' %2s">%3s</a>',
$edit_link,
$post_title
esc_attr( $post_title ),
$title_with_edit_link
);
}

Expand Down
7 changes: 4 additions & 3 deletions admin/class-custom-permalinks-taxonomies-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,13 @@ protected function column_title( $item ) {
}
}

$title_with_edit_link = $term_title;
$title_with_edit_link = esc_html( $term_title );
if ( ! empty( $edit_link ) ) {
$title_with_edit_link = sprintf(
'<a href="%s" target="_blank" title="' . esc_html__( 'Edit ', 'custom-permalinks' ) . ' ' . $term_title . '">%s</a>',
'<a href="%1s" target="_blank" title="' . esc_attr__( 'Edit', 'custom-permalinks' ) . ' %2s">%3s</a>',
$edit_link,
$term_title
esc_attr( $term_title ),
$title_with_edit_link
);
}

Expand Down

0 comments on commit caf4d6c

Please sign in to comment.