diff --git a/src/wp-admin/includes/class-wp-terms-list-table.php b/src/wp-admin/includes/class-wp-terms-list-table.php index 7537a499974d5..75e37e45d5c4f 100644 --- a/src/wp-admin/includes/class-wp-terms-list-table.php +++ b/src/wp-admin/includes/class-wp-terms-list-table.php @@ -413,10 +413,8 @@ public function column_name( $tag ) { $edit_link ); $name = sprintf( - '%s', + '%s', esc_url( $edit_link ), - /* translators: %s: Taxonomy term name. */ - esc_attr( sprintf( __( '“%s” (Edit)' ), $tag->name ) ), $name ); } diff --git a/tests/e2e/specs/edit-posts.test.js b/tests/e2e/specs/edit-posts.test.js index 0e2eb3687f778..9b8cd37c60e50 100644 --- a/tests/e2e/specs/edit-posts.test.js +++ b/tests/e2e/specs/edit-posts.test.js @@ -53,7 +53,7 @@ test.describe( 'Edit Posts', () => { await expect( listTable ).toBeVisible(); // Click the post title (edit) link - await listTable.getByRole( 'link', { name: `“${ title }” (Edit)` } ).click(); + await listTable.getByRole( 'link', { name: title, exact: true } ).click(); // Wait for the editor iframe to load, and switch to it as the active content frame. await page @@ -84,7 +84,7 @@ test.describe( 'Edit Posts', () => { await expect( listTable ).toBeVisible(); // // Focus on the post title link. - await listTable.getByRole( 'link', { name: `“${ title }” (Edit)` } ).focus(); + await listTable.getByRole( 'link', { name: title, exact: true } ).focus(); // Tab to the Quick Edit button and press Enter to quick edit. await pageUtils.pressKeys( 'Tab', { times: 2 } ) @@ -122,7 +122,7 @@ test.describe( 'Edit Posts', () => { await expect( listTable ).toBeVisible(); // Focus on the post title link. - await listTable.getByRole( 'link', { name: `“${ title }” (Edit)` } ).focus(); + await listTable.getByRole( 'link', { name: title, exact: true } ).focus(); // Tab to the Trash button and press Enter to delete the post. await pageUtils.pressKeys( 'Tab', { times: 3 } ) diff --git a/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js b/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js index d970ca09b1c90..5f71ff2e415c5 100644 --- a/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js +++ b/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js @@ -20,7 +20,7 @@ test.describe( 'Empty Trash', () => { await expect( listTable ).toBeVisible(); // Move post to trash - await listTable.getByRole( 'link', { name: `“${ POST_TITLE }” (Edit)` } ).hover(); + await listTable.getByRole( 'link', { name: POST_TITLE, exact: true } ).hover(); await listTable.getByRole( 'link', { name: `Move “${POST_TITLE}” to the Trash` } ).click(); // Empty trash @@ -40,7 +40,7 @@ test.describe( 'Empty Trash', () => { await expect( listTable ).toBeVisible(); // Move post to trash - await listTable.getByRole( 'link', { name: `“${ POST_TITLE }” (Edit)` } ).hover(); + await listTable.getByRole( 'link', { name: POST_TITLE, exact: true } ).hover(); await listTable.getByRole( 'link', { name: `Move “${POST_TITLE}” to the Trash` } ).click(); await page.getByRole( 'link', { name: 'Trash' } ).click();