WordPress.org

Make WordPress Core

Ticket #24416: 24416.patch

File 24416.patch, 1.0 KB (added by tollmanz, 22 months ago)
  • wp-includes/post-formats.php

    diff --git a/wp-includes/post-formats.php b/wp-includes/post-formats.php
    index 5a2c1f7..0df6dea 100644
    a b function get_content_url( &$content, $remove = false ) { 
    790790                return $trimmed; 
    791791        // the content is HTML so we grab the first href 
    792792        } elseif ( preg_match( '/<a\s[^>]*?href=([\'"])(.+?)\1/is', $content, $matches ) ) { 
    793                 return esc_url_raw( $matches[2] ); 
     793                return $matches[2]; 
    794794        } 
    795795 
    796796        $lines = explode( "\n", $trimmed ); 
    function get_content_url( &$content, $remove = false ) { 
    801801                if ( $remove ) 
    802802                        $content = trim( join( "\n", $lines ) ); 
    803803 
    804                 return esc_url_raw( $line ); 
     804                return $line; 
    805805        } 
    806806 
    807807        return ''; 
    function get_the_post_format_url( $post_id = 0 ) { 
    844844        } 
    845845 
    846846        if ( ! empty( $post->post_content ) ) 
    847                 return apply_filters( 'get_the_post_format_url', get_content_url( $post->post_content ), $post ); 
     847                return apply_filters( 'get_the_post_format_url', esc_url_raw( get_content_url( $post->post_content ) ), $post ); 
    848848} 
    849849 
    850850/**