diff --git wp-includes/media.php wp-includes/media.php
index e3b9008..808dcaf 100644
|
|
class WP_Embed { |
1261 | 1261 | * @return string Potentially modified $content. |
1262 | 1262 | */ |
1263 | 1263 | function autoembed( $content ) { |
1264 | | return preg_replace_callback( '|^\s*(https?://[^\s"]+)\s*$|im', array(&$this, 'autoembed_callback'), $content ); |
| 1264 | return preg_replace_callback( |
| 1265 | '|^\s*(?:<a href="[^"]+">)?(?P<url>https?://[^\s<"]+)(?:</a>)?\s*$|im', |
| 1266 | array( &$this, 'autoembed_callback' ), |
| 1267 | $content |
| 1268 | ); |
1265 | 1269 | } |
1266 | 1270 | |
1267 | 1271 | /** |
… |
… |
class WP_Embed { |
1275 | 1279 | function autoembed_callback( $match ) { |
1276 | 1280 | $oldval = $this->linkifunknown; |
1277 | 1281 | $this->linkifunknown = false; |
1278 | | $return = $this->shortcode( array(), $match[1] ); |
| 1282 | $return = $this->shortcode( array(), $match['url'] ); |
1279 | 1283 | $this->linkifunknown = $oldval; |
1280 | 1284 | |
1281 | 1285 | return "\n$return\n"; |