if (isset($oembed_data->title))
$siteinfo["title"] = $oembed_data->title;
if (isset($oembed_data->description))
- $siteinfo["text"] = $oembed_data->description;
+ $siteinfo["text"] = trim($oembed_data->description);
if (isset($oembed_data->thumbnail_url))
$siteinfo["image"] = $oembed_data->thumbnail_url;
}
foreach ($node->attributes as $attribute)
$attr[$attribute->name] = $attribute->value;
- $attr["content"] = html_entity_decode($attr["content"], ENT_QUOTES, "UTF-8");
+ $attr["content"] = trim(html_entity_decode($attr["content"], ENT_QUOTES, "UTF-8"));
switch (strtolower($attr["name"])) {
case "fulltitle":
foreach ($node->attributes as $attribute)
$attr[$attribute->name] = $attribute->value;
- $attr["content"] = html_entity_decode($attr["content"], ENT_QUOTES, "UTF-8");
+ $attr["content"] = trim(html_entity_decode($attr["content"], ENT_QUOTES, "UTF-8"));
switch (strtolower($attr["property"])) {
case "og:image":
while (strpos($text, " "))
$text = trim(str_replace(" ", " ", $text));
- $siteinfo["text"] = html_entity_decode(substr($text,0,350), ENT_QUOTES, "UTF-8").'...';
+ $siteinfo["text"] = trim(html_entity_decode(substr($text,0,350), ENT_QUOTES, "UTF-8").'...');
}
}