Changing the bbcode conversion since that sometimes lead to missing links
This commit is contained in:
parent
f66a8d0be8
commit
823b812cce
|
@ -502,7 +502,7 @@ function statusnet_shortenmsg($b, $max_char) {
|
||||||
//$body = preg_replace("/\[share(.*?)\](.*?)\[\/share\]/ism","\n\n$2\n\n",$body);
|
//$body = preg_replace("/\[share(.*?)\](.*?)\[\/share\]/ism","\n\n$2\n\n",$body);
|
||||||
|
|
||||||
// At first convert the text to html
|
// At first convert the text to html
|
||||||
$html = bbcode(api_clean_plain_items($body), false, false, 2, true);
|
$html = bbcode(api_clean_plain_items($body), false, false, 2);
|
||||||
|
|
||||||
// Then convert it to plain text
|
// Then convert it to plain text
|
||||||
//$msg = trim($b['title']." \n\n".html2plain($html, 0, true));
|
//$msg = trim($b['title']." \n\n".html2plain($html, 0, true));
|
||||||
|
|
|
@ -428,7 +428,7 @@ function twitter_shortenmsg($b, $shortlink = false) {
|
||||||
//$body = preg_replace("/\[share(.*?)\](.*?)\[\/share\]/ism","\n\n$2\n\n",$body);
|
//$body = preg_replace("/\[share(.*?)\](.*?)\[\/share\]/ism","\n\n$2\n\n",$body);
|
||||||
|
|
||||||
// At first convert the text to html
|
// At first convert the text to html
|
||||||
$html = bbcode(api_clean_plain_items($body), false, false, 2, true);
|
$html = bbcode(api_clean_plain_items($body), false, false, 2);
|
||||||
|
|
||||||
// Then convert it to plain text
|
// Then convert it to plain text
|
||||||
$msg = trim(html2plain($html, 0, true));
|
$msg = trim(html2plain($html, 0, true));
|
||||||
|
|
Loading…
Reference in a new issue