mirror of
https://github.com/friendica/friendica
synced 2024-11-10 03:02:54 +00:00
Merge https://github.com/friendica/friendica into pull
This commit is contained in:
commit
3381afab3d
2 changed files with 12 additions and 1 deletions
|
@ -672,10 +672,15 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
|
||||||
// $Text = mb_convert_encoding($Text, "UTF-8", 'HTML-ENTITIES');
|
// $Text = mb_convert_encoding($Text, "UTF-8", 'HTML-ENTITIES');
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
// Remove all hashtag addresses
|
||||||
|
if (!$tryoembed AND get_config("system", "remove_hashtags_on_export")) {
|
||||||
|
$pattern = '/#<a.*?href="(.*?)".*?>(.*?)<\/a>/is';
|
||||||
|
$Text = preg_replace($pattern, '#$2', $Text);
|
||||||
|
}
|
||||||
|
|
||||||
call_hooks('bbcode',$Text);
|
call_hooks('bbcode',$Text);
|
||||||
|
|
||||||
$a->save_timestamp($stamp1, "parser");
|
$a->save_timestamp($stamp1, "parser");
|
||||||
|
|
||||||
return $Text;
|
return $Text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,6 +107,12 @@ function html2plain($html, $wraplength = 75, $compact = false)
|
||||||
|
|
||||||
$message = str_replace("\r", "", $html);
|
$message = str_replace("\r", "", $html);
|
||||||
|
|
||||||
|
// replace all hashtag addresses
|
||||||
|
if (get_config("system", "remove_hashtags_on_export")) {
|
||||||
|
$pattern = '/#<a.*?href="(.*?)".*?>(.*?)<\/a>/is';
|
||||||
|
$message = preg_replace($pattern, '#$2', $message);
|
||||||
|
}
|
||||||
|
|
||||||
$doc = new DOMDocument();
|
$doc = new DOMDocument();
|
||||||
$doc->preserveWhiteSpace = false;
|
$doc->preserveWhiteSpace = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue