Skip to content

Commit

Permalink
Coding Standards: Use correct escaping function for wp_http_referer.
Browse files Browse the repository at this point in the history
Follow-up to [58069].

Props yogeshbhutkar, sainathpoojary, PcTevree, knutsp, siliconforks, stromhalm, shanemuir.
Fixes #62551.

git-svn-id: https://develop.svn.wordpress.org/trunk@59496 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Dec 6, 2024
1 parent d45a119 commit 1b1e35d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/wp-admin/edit-tag-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
do_action_deprecated( 'edit_tag_form_pre', array( $tag ), '3.0.0', '{$taxonomy}_pre_edit_form' );
}

$wp_http_referer = ! empty( $_REQUEST['wp_http_referer'] ) ? sanitize_text_field( $_REQUEST['wp_http_referer'] ) : '';
$wp_http_referer = ! empty( $_REQUEST['wp_http_referer'] ) ? sanitize_url( $_REQUEST['wp_http_referer'] ) : '';
$wp_http_referer = remove_query_arg( array( 'action', 'message', 'tag_ID' ), $wp_http_referer );

// Also used by Edit Tags.
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/user-edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

$action = ! empty( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['action'] ) : '';
$user_id = ! empty( $_REQUEST['user_id'] ) ? absint( $_REQUEST['user_id'] ) : 0;
$wp_http_referer = ! empty( $_REQUEST['wp_http_referer'] ) ? sanitize_text_field( $_REQUEST['wp_http_referer'] ) : '';
$wp_http_referer = ! empty( $_REQUEST['wp_http_referer'] ) ? sanitize_url( $_REQUEST['wp_http_referer'] ) : '';

$current_user = wp_get_current_user();

Expand Down

0 comments on commit 1b1e35d

Please sign in to comment.