1
0
Fork 0
This commit is contained in:
friendica 2013-05-20 17:37:23 -07:00
commit 3381afab3d
2 changed files with 12 additions and 1 deletions

View file

@ -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;
} }

View file

@ -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;