Make WordPress Core

Changeset 6321


Ignore:
Timestamp:
11/07/2007 06:20:08 AM (17 years ago)
Author:
ryan
Message:

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

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r6306 r6321  
    410410
    411411function sanitize_post($post, $context = 'display') {
     412
     413    if ( 'raw' == $context )
     414        return $post;
     415
    412416    // TODO: Use array keys instead of hard coded list
    413417    $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');
  • trunk/wp-includes/taxonomy.php

    r6311 r6321  
    735735 */
    736736function sanitize_term($term, $taxonomy, $context = 'display') {
     737
     738    if ( 'raw' == $context )
     739        return $term;
     740
    737741    $fields = array('term_id', 'name', 'description', 'slug', 'count', 'parent', 'term_group');
    738742
Note: See TracChangeset for help on using the changeset viewer.