]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/PageInfo.php
Merge remote-tracking branch 'upstream/develop' into item-lock
[friendica.git] / src / Content / PageInfo.php
index d301c4d04d729352c58d932b698dddd0a3d623dc..786385c3ef7d4a841efb372650e31ce07cf91fb3 100644 (file)
@@ -142,6 +142,10 @@ class PageInfo
                        $text .= " title='" . $data['title'] . "'";
                }
 
+               if (empty($data['text'])) {
+                       $data['text'] = '';
+               }
+
                // Only embedd a picture link when it seems to be a valid picture ("width" is set)
                if (!empty($data['images']) && !empty($data['images'][0]['width'])) {
                        $preview = str_replace(['[', ']'], ['[', ']'], htmlentities($data['images'][0]['src'], ENT_QUOTES, 'UTF-8', false));
@@ -288,7 +292,7 @@ class PageInfo
                        $quotedUrl
                )$#isx", function ($match) use ($url) {
                        // Stripping URLs with no label
-                       if (!isset($match[1])) {
+                       if (empty($match[1])) {
                                return '';
                        }