Make WordPress Core

Changeset 21833


Ignore:
Timestamp:
09/13/2012 05:06:25 PM (14 years ago)
Author:
nacin
Message:

Don't sanitize include and exclude in gallery_shortcode(), as this is handled further down the stack, and better. props SergeyBiryukov, TobiasBg. fixes #21827.

File:
1 edited

Legend:

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

    r21830 r21833  
    818818
    819819        if ( !empty($include) ) {
    820                 $include = preg_replace( '/[^0-9,]+/', '', $include );
    821820                $_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );
    822821
     
    826825                }
    827826        } elseif ( !empty($exclude) ) {
    828                 $exclude = preg_replace( '/[^0-9,]+/', '', $exclude );
    829827                $attachments = get_children( array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );
    830828        } else {
Note: See TracChangeset for help on using the changeset viewer.