return($url);
}
-function gpluspost_ShareAttributes($match) {
-
- $attributes = $match[1];
-
- $author = "";
- preg_match("/author='(.*?)'/ism", $attributes, $matches);
- if ($matches[1] != "")
- $author = $matches[1];
-
- preg_match('/author="(.*?)"/ism', $attributes, $matches);
- if ($matches[1] != "")
- $author = $matches[1];
-
- $headline = '<div class="shared_header">';
-
- $headline .= sprintf(t('%s:'), $author);
-
- $headline .= "</div>";
-
- //$text = "<br />".$headline."</strong><blockquote>".$match[2]."</blockquote>";
- //$text = "\n\t".$match[2].":\t";
- $text = html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8').$author.": ".$match[2];
-
- return($text);
-}
-
function gpluspost_feeditem($pid, $uid) {
global $a;
$multiplelinks = (strpos($item['body'], "[bookmark") != strrpos($item['body'], "[bookmark"));
$body = $item['body'];
- $body = preg_replace_callback("/\[share(.*?)\]\s?(.*?)\s?\[\/share\]/ism","gpluspost_ShareAttributes", $body);
- $html = bbcode($body, false, false);
+ // At first convert the text to html
+ $html = bbcode($body, false, false, 2);
+
+ // Then convert it to plain text
$msg = trim(html2plain($html, 0, true));
+ $msg = html_entity_decode($msg,ENT_QUOTES,'UTF-8');
// If there is no bookmark element then take the first link
if ($link == '') {