WordPress.org

Make WordPress Core

Ticket #50567: post.php.patch

File post.php.patch, 379 bytes (added by Cybr, 16 months ago)

Sanitize post before storing it in cache.

  • wp-includes/post.php

     
    67226722        }
    67236723
    67246724        foreach ( $posts as $post ) {
     6725                if ( empty( $post->filter ) ) {
     6726                        $post = sanitize_post( $post, 'raw' );
     6727                }
    67256728                wp_cache_add( $post->ID, $post, 'posts' );
    67266729        }
    67276730}