mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-22 07:23:40 +00:00
Twitter/Statusnet: Problem with vanishing linebreaks when message isn't shortened
This commit is contained in:
parent
4f3e76e87e
commit
b0dbf4d54c
2 changed files with 11 additions and 2 deletions
|
@ -482,9 +482,14 @@ function statusnet_post_hook(&$a,&$b) {
|
||||||
}
|
}
|
||||||
// ok, all the links we want to send out are save, now strip
|
// ok, all the links we want to send out are save, now strip
|
||||||
// away the remaining bbcode
|
// away the remaining bbcode
|
||||||
$msg = strip_tags(bbcode($tmp, false, false));
|
//$msg = strip_tags(bbcode($tmp, false, false));
|
||||||
|
$msg = bbcode($tmp, false, false);
|
||||||
|
$msg = str_replace(array('<br>','<br />'),"\n",$msg);
|
||||||
|
$msg = strip_tags($msg);
|
||||||
|
|
||||||
// quotes not working - let's try this
|
// quotes not working - let's try this
|
||||||
$msg = html_entity_decode($msg);
|
$msg = html_entity_decode($msg);
|
||||||
|
|
||||||
if (( strlen($msg) > $max_char) && $max_char > 0) {
|
if (( strlen($msg) > $max_char) && $max_char > 0) {
|
||||||
$shortlink = short_link( $b['plink'] );
|
$shortlink = short_link( $b['plink'] );
|
||||||
// the new message will be shortened such that "... $shortlink"
|
// the new message will be shortened such that "... $shortlink"
|
||||||
|
|
|
@ -347,7 +347,11 @@ function twitter_post_hook(&$a,&$b) {
|
||||||
}
|
}
|
||||||
// ok, all the links we want to send out are save, now strip
|
// ok, all the links we want to send out are save, now strip
|
||||||
// away the remaining bbcode
|
// away the remaining bbcode
|
||||||
$msg = strip_tags(bbcode($tmp, false, false));
|
//$msg = strip_tags(bbcode($tmp, false, false));
|
||||||
|
$msg = bbcode($tmp, false, false);
|
||||||
|
$msg = str_replace(array('<br>','<br />'),"\n",$msg);
|
||||||
|
$msg = strip_tags($msg);
|
||||||
|
|
||||||
// quotes not working - let's try this
|
// quotes not working - let's try this
|
||||||
$msg = html_entity_decode($msg);
|
$msg = html_entity_decode($msg);
|
||||||
if (( strlen($msg) > $max_char) && $max_char > 0) {
|
if (( strlen($msg) > $max_char) && $max_char > 0) {
|
||||||
|
|
Loading…
Reference in a new issue