From 6762f6169e658d798029371b5fa7ade3a86ace07 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 15 May 2008 00:20:27 +0000 Subject: [PATCH] Press This: Fetch offsite images, fix slashing. see #6813 git-svn-id: http://svn.automattic.com/wordpress/trunk@7934 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/press-this.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/wp-admin/press-this.php b/wp-admin/press-this.php index 973f19d6df..47ba8666d3 100644 --- a/wp-admin/press-this.php +++ b/wp-admin/press-this.php @@ -87,26 +87,30 @@ function get_images_from_uri($uri) { if ( false === $content ) return ''; - $pattern = '/img.+?src=[\'"]?([^\'" >]+)[\'" >]/'; + $pattern = '/]+src=[\'"]([^\'" >]+?)[\'" >]/is'; preg_match_all($pattern, $content, $matches); if ( empty($matches[1]) ) return ''; + /* $from_host = parse_url($uri); $from_host = $from_host['host']; $from_host = explode('.', $from_host); $count = count($from_host); $from_host = $from_host[$count - 2] . '.' . $from_host[$count - 1]; + */ $sources = array(); foreach ($matches[1] as $src) { if ( false !== strpos($src, '&') ) continue; + /* $img_host = parse_url($src); $img_host = $img_host['host']; if ( false === strpos($img_host, $from_host) ) continue; + */ $sources[] = $src; } @@ -229,11 +233,11 @@ if ( empty($_GET['tab']) ) { jQuery(document).ready(function() { - jQuery('#container > ul').tabs({ selected: 3, fx: { height: 'toggle', opacity: 'toggle', fxSpeed: 'fast' } }); + jQuery('#container > ul').tabs({ selected: 3 }); - jQuery('#container > ul').tabs({ selected: 1, fx: { height: 'toggle', opacity: 'toggle', fxSpeed: 'fast' } }); + jQuery('#container > ul').tabs({ selected: 1 }); - jQuery('#container > ul').tabs({ selected: 1, fx: { height: 'toggle', opacity: 'toggle', fxSpeed: 'fast' } }); + jQuery('#container > ul').tabs(); }); @@ -254,10 +258,10 @@ if ( empty($_GET['tab']) ) { ?>
    -
  • -
  • -
  • -
  • +
  • +
  • +
  • +