aboutsummaryrefslogtreecommitdiffstats
path: root/mod/parse_url.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-12-30 15:25:06 -0800
committerfriendica <info@friendica.com>2014-12-30 15:25:06 -0800
commitabd345f80f5074d325fd137e48a23925eaa66802 (patch)
treec5a469a001b2eb9ae5482b93b557a42e3181208f /mod/parse_url.php
parent2f650b74d35335815c48537cd03c81cc92a3c4f8 (diff)
parentae9d08267c632cae36a4ebd34c2077fd0051e0e7 (diff)
downloadvolse-hubzilla-abd345f80f5074d325fd137e48a23925eaa66802.tar.gz
volse-hubzilla-abd345f80f5074d325fd137e48a23925eaa66802.tar.bz2
volse-hubzilla-abd345f80f5074d325fd137e48a23925eaa66802.zip
Merge branch 'master' into trinidad
Diffstat (limited to 'mod/parse_url.php')
-rw-r--r--mod/parse_url.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/mod/parse_url.php b/mod/parse_url.php
index 340e1a67e..23d608411 100644
--- a/mod/parse_url.php
+++ b/mod/parse_url.php
@@ -307,7 +307,14 @@ function parse_url_content(&$a) {
$max_images = intval($max_images);
foreach ($siteinfo["images"] as $imagedata) {
- $image .= '[img='.$imagedata["width"].'x'.$imagedata["height"].']'.$imagedata["src"].'[/img]' . "\n";
+ if ($url) {
+ $image .= sprintf('[url=%s]', $url);
+ }
+ $image .= '[img='.$imagedata["width"].'x'.$imagedata["height"].']'.$imagedata["src"].'[/img]';
+ if ($url) {
+ $image .= '[/url]';
+ }
+ $image .= "\n";
$total_images ++;
if($max_images && $max_images >= $total_images)
break;