removing of hashtag addresses is now hidden behind a configuration

This commit is contained in:
Michael Vogel 2013-05-19 11:08:08 +02:00
parent 5ef6bdf88a
commit 0723933c1c
2 changed files with 5 additions and 4 deletions

View file

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