friendica 8 years ago
parent
commit
3381afab3d
  1. 7
      include/bbcode.php
  2. 6
      include/html2plain.php

7
include/bbcode.php

@ -672,10 +672,15 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
// $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);
$a->save_timestamp($stamp1, "parser");
return $Text;
}

6
include/html2plain.php

@ -107,6 +107,12 @@ function html2plain($html, $wraplength = 75, $compact = false)
$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->preserveWhiteSpace = false;

Loading…
Cancel
Save