From 894f0156afdb605883af4c3419ead4aec09617da Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 21 Aug 2017 15:00:45 -0700 Subject: more work on oembed from /display --- Zotlabs/Module/Oep.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Zotlabs/Module/Oep.php') diff --git a/Zotlabs/Module/Oep.php b/Zotlabs/Module/Oep.php index a3453ff31..6469a7007 100644 --- a/Zotlabs/Module/Oep.php +++ b/Zotlabs/Module/Oep.php @@ -66,9 +66,9 @@ class Oep extends \Zotlabs\Web\Controller { $url = $args['url']; $maxwidth = intval($args['maxwidth']); $maxheight = intval($args['maxheight']); - - if(preg_match('#//display/(.*?)(&|\?|$)#',$url,$matches)) { - $res = $matches[1]; + logger('processing display'); + if(preg_match('#//(.*?)/display/(.*?)(&|\?|$)#',$url,$matches)) { + $res = $matches[2]; } if(strpos($res,'b64.') === 0) { @@ -78,7 +78,7 @@ class Oep extends \Zotlabs\Web\Controller { $item_normal = item_normal(); $p = q("select * from item where mid like '%s' limit 1", - dbesc($res . '%'), + dbesc($res . '%') ); if(! $p) -- cgit v1.2.3