mirror of
https://github.com/friendica/friendica
synced 2024-11-09 23:42:53 +00:00
removing of hashtag addresses is now hidden behind a configuration
This commit is contained in:
parent
5ef6bdf88a
commit
0723933c1c
2 changed files with 5 additions and 4 deletions
|
@ -673,7 +673,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
|
|||
//}
|
||||
|
||||
// Remove all hashtag addresses
|
||||
if (!$tryoembed) {
|
||||
if (!$tryoembed AND get_config("system", "remove_hashtags_on_export")) {
|
||||
$pattern = '/#<a.*?href="(.*?)".*?>(.*?)<\/a>/is';
|
||||
$Text = preg_replace($pattern, '#$2', $Text);
|
||||
}
|
||||
|
@ -684,4 +684,3 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
|
|||
|
||||
return $Text;
|
||||
}
|
||||
|
||||
|
|
|
@ -108,8 +108,10 @@ function html2plain($html, $wraplength = 75, $compact = false)
|
|||
$message = str_replace("\r", "", $html);
|
||||
|
||||
// replace all hashtag addresses
|
||||
$pattern = '/#<a.*?href="(.*?)".*?>(.*?)<\/a>/is';
|
||||
$message = preg_replace($pattern, '#$2', $message);
|
||||
if (get_config("system", "remove_hashtags_on_export")) {
|
||||
$pattern = '/#<a.*?href="(.*?)".*?>(.*?)<\/a>/is';
|
||||
$message = preg_replace($pattern, '#$2', $message);
|
||||
}
|
||||
|
||||
$doc = new DOMDocument();
|
||||
$doc->preserveWhiteSpace = false;
|
||||
|
|
Loading…
Reference in a new issue