]> git.mxchange.org Git - friendica.git/commitdiff
Unbalanced html fixed
authorMichael <heluecht@pirati.ca>
Thu, 11 Jan 2018 22:34:56 +0000 (22:34 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 11 Jan 2018 22:34:56 +0000 (22:34 +0000)
src/Content/OEmbed.php

index 46442dd6f17b3c2267dd8ddfbc851dc4337a62d5..3ab5b4fea863a1a01a293ed16164ab0760b78d5f 100644 (file)
@@ -199,7 +199,6 @@ class OEmbed
                                break;
                }
 
-               $ret .= '</div>';
                // add link to source if not present in "rich" type
                if ($j->type != 'rich' || !strpos($j->html, $embedurl)) {
                        $ret .= '<h4>';
@@ -238,6 +237,8 @@ class OEmbed
                        $ret .= '<a href="' . $embedurl . '" rel="oembed">' . $j->title . '</a>';
                }
 
+               $ret .= '</div>';
+
                $ret = str_replace("\n", "", $ret);
                return mb_convert_encoding($ret, 'HTML-ENTITIES', mb_detect_encoding($ret));
        }