Have wp_referer_field() set the referer to the current page. fixes #2800

git-svn-id: https://develop.svn.wordpress.org/trunk@3919 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-06-24 18:17:10 +00:00
parent 11a6312a36
commit 98b02c5e7c
1 changed files with 1 additions and 2 deletions

View File

@ -815,8 +815,7 @@ function wp_nonce_field($action = -1) {
} }
function wp_referer_field() { function wp_referer_field() {
$ref = ( false === wp_get_referer() ) ? $_SERVER['REQUEST_URI'] : wp_get_referer(); $ref = wp_specialchars($_SERVER['REQUEST_URI']);
$ref = wp_specialchars(stripslashes($ref));
echo '<input type="hidden" name="_wp_http_referer" value="'. $ref . '" />'; echo '<input type="hidden" name="_wp_http_referer" value="'. $ref . '" />';
if ( wp_get_original_referer() ) { if ( wp_get_original_referer() ) {
$original_ref = wp_specialchars(stripslashes(wp_get_original_referer())); $original_ref = wp_specialchars(stripslashes(wp_get_original_referer()));