Skip to content

Commit

Permalink
Escape URL's
Browse files Browse the repository at this point in the history
  • Loading branch information
sebet committed May 8, 2015
1 parent a06242d commit d6c85e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion PostMetabox.php
Expand Up @@ -292,7 +292,8 @@ protected function save( $post_id ) {
);
update_post_meta( $post_id, '_error_data_' . $this->id, $error_data );

$location = add_query_arg( 'message', 1, esc_url_raw( get_edit_post_link( $post_id, 'url' ) ) );
$location = esc_url_raw( add_query_arg( 'message', 1, esc_url_raw( get_edit_post_link( $post_id, 'url' ) ) ) );

wp_redirect( apply_filters( 'redirect_post_location', $location, $post_id ) );
exit;
}
Expand Down
2 changes: 1 addition & 1 deletion Util.php
Expand Up @@ -425,7 +425,7 @@ function html_link( $url, $title = '' ) {
$title = $url;
}

return html( 'a', array( 'href' => $url ), $title );
return html( 'a', array( 'href' => esc_url( $url ) ), $title );
}
endif;

Expand Down

0 comments on commit d6c85e1

Please sign in to comment.