aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-02-09 08:02:58 +0000
committerMario <mario@mariovavti.com>2024-02-09 08:02:58 +0000
commit096fad5e8c71aea99d469b844d99fe9c9d58bc77 (patch)
tree3a66999fa2e814ee581bf82d86146b2b2cb4115a /include
parente21e4c71275aaeb61c5a8ddb7ac5f179b4081cd3 (diff)
downloadvolse-hubzilla-096fad5e8c71aea99d469b844d99fe9c9d58bc77.tar.gz
volse-hubzilla-096fad5e8c71aea99d469b844d99fe9c9d58bc77.tar.bz2
volse-hubzilla-096fad5e8c71aea99d469b844d99fe9c9d58bc77.zip
another try
Diffstat (limited to 'include')
-rw-r--r--include/html2bbcode.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/html2bbcode.php b/include/html2bbcode.php
index c1c1f972f..c00df8f23 100644
--- a/include/html2bbcode.php
+++ b/include/html2bbcode.php
@@ -193,7 +193,7 @@ function html2bbcode($message)
node2bbcode($doc, 'blockquote', array(), '[quote]', '[/quote]');
// Use a temporary tag to keep line breaks
- node2bbcode($doc, 'br', array(), '[br] ', '');
+ node2bbcode($doc, 'br', array(), '[br]', '');
node2bbcode($doc, 'a', array('href'=>'/(.+)/'), '[url=$1]', '[/url]');
@@ -304,7 +304,7 @@ function html2bbcode($message)
array('[b]', '[/b]', '[i]', '[/i]'), $message);
// Restore linebreaks from temp tag
- $message = str_replace('[br] ', "\n", $message);
+ $message = preg_replace('/\[br\]\s{1}|\[br\]/', "\n", $message);
// Handling Yahoo style of mails
// $message = str_replace('[hr][b]From:[/b]', '[quote][b]From:[/b]', $message);