Skip to content

Commit 3cfa9ab

Browse files
committed
Merge pull request #104 from danielbachhuber/escaping
Escape a few values that should be prepared for output
2 parents 7b5ac40 + 09a2227 commit 3cfa9ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/class-wp-rest-oauth1-listtable.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function column_cb( $item ) {
4646
for="cb-select-<?php echo esc_attr( $item->ID ) ?>"><?php esc_html_e( 'Select consumer', 'rest_oauth1' ); ?></label>
4747

4848
<input id="cb-select-<?php echo esc_attr( $item->ID ) ?>" type="checkbox"
49-
name="consumers[]" value="<?php echo $item->ID ?>" />
49+
name="consumers[]" value="<?php echo esc_attr( $item->ID ) ?>" />
5050

5151
<?php
5252
}
@@ -76,8 +76,8 @@ protected function column_name( $item ) {
7676
$delete_link = wp_nonce_url( $delete_link, 'rest-oauth1-delete:' . $item->ID );
7777

7878
$actions = array(
79-
'edit' => sprintf( '<a href="%s">%s</a>', $edit_link, esc_html__( 'Edit', 'rest_oauth1' ) ),
80-
'delete' => sprintf( '<a href="%s">%s</a>', $delete_link, esc_html__( 'Delete', 'rest_oauth1' ) ),
79+
'edit' => sprintf( '<a href="%s">%s</a>', esc_url( $edit_link ), esc_html__( 'Edit', 'rest_oauth1' ) ),
80+
'delete' => sprintf( '<a href="%s">%s</a>', esc_url( $delete_link ), esc_html__( 'Delete', 'rest_oauth1' ) ),
8181
);
8282
$action_html = $this->row_actions( $actions );
8383

0 commit comments

Comments
 (0)