When converting to HTML, hashtag addresses are now removed (only when the message is exported)
This commit is contained in:
parent
f7fbac2e2b
commit
d4240a265b
2 changed files with 10 additions and 0 deletions
|
@ -668,6 +668,12 @@ 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) {
|
||||||
|
$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");
|
||||||
|
|
|
@ -107,6 +107,10 @@ function html2plain($html, $wraplength = 75, $compact = false)
|
||||||
|
|
||||||
$message = str_replace("\r", "", $html);
|
$message = str_replace("\r", "", $html);
|
||||||
|
|
||||||
|
// replace all hashtag addresses
|
||||||
|
$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