X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fhtml2bbcode.php;h=734282d95c2f398ec0499777c12242508979b17c;hb=2afd4c9d5a5b0543d7de3fd8b5428fbb91a3898b;hp=688c0145266a78b67ef8ef47f077d206574b8664;hpb=ca83d24c0253a769f3e55c312dfd3bcd5fa7dfc7;p=friendica.git
diff --git a/include/html2bbcode.php b/include/html2bbcode.php
index 688c014526..734282d95c 100644
--- a/include/html2bbcode.php
+++ b/include/html2bbcode.php
@@ -7,10 +7,18 @@
function html2bbcode($s) {
+
+ // only keep newlines from source that are within pre tags
+
+ $s = stripnl_exceptinpre($s);
+
+
// Tags to Find
$htmltags = array(
- '/\n/is',
+ '/\
(.*?)\<\/pre\>/is',
+ '/\/is',
+ '/\<\/p\>/is',
'/\(.*?)\<\/b\>/is',
'/\(.*?)\<\/i\>/is',
'/\(.*?)\<\/u\>/is',
@@ -20,9 +28,10 @@ function html2bbcode($s) {
'/\(.*?)\<\/div\>/is',
'/\
/is',
'/\
(.*?)\<\/strong\>/is',
- '/\(.*?)\<\/a\>/is',
+ '/\(.*?)\<\/a\>/is',
'/\(.*?)\<\/code\>/is',
'/\(.*?)\<\/span\>/is',
+ '/\(.*?)\<\/span\>/is',
'/\(.*?)\<\/blockquote\>/is',
'/\