255) { $og_desc = substr(@$og_desc, 0, 252); $og_desc = substr($og_desc, 0, strrpos($og_desc, ' ')); $og_desc .= '...'; } $html = str_replace('[@og_title@]', @$og_title, $html); $html = str_replace('[@og_image@]', htmlspecialchars(@$og_image), $html); $html = str_replace('[@og_desc@]', htmlspecialchars(@$og_desc), $html); return $html; }