WordPress.org

Make WordPress Core

Ticket #23776: 23776.patch

File 23776.patch, 555 bytes (added by UmeshSingla, 7 years ago)

Fixes new line being inserted for a url, URL being not converted to Hyperlink

  • wp-includes/class-wp-embed.php

     
    308308         */
    309309        public function autoembed_callback( $match ) {
    310310                $oldval = $this->linkifunknown;
    311                 $this->linkifunknown = false;
    312311                $return = $this->shortcode( array(), $match[1] );
    313                 $this->linkifunknown = $oldval;
    314312
    315                 return "\n$return\n";
     313                return strpos( $return, '<iframe' ) !== false ? "\n$return\n" : $return;
    316314        }
    317315
    318316        /**