aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-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;