Skip sanitization altogether for raw context. Props Quandary. fixes #5325

git-svn-id: https://develop.svn.wordpress.org/trunk@6321 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-11-07 06:20:08 +00:00
parent d5ed4b3d7d
commit 3330c693e4
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -409,6 +409,10 @@ function get_post_custom_values( $key = '', $post_id = 0 ) {
}
function sanitize_post($post, $context = 'display') {
if ( 'raw' == $context )
return $post;
// TODO: Use array keys instead of hard coded list
$fields = array('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_content_filtered', 'post_title', 'post_excerpt', 'post_status', 'post_type', 'comment_status', 'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged', 'post_date', 'post_date_gmt', 'post_parent', 'menu_order', 'post_mime_type', 'post_category');