]> git.mxchange.org Git - friendica.git/commitdiff
For very large posts (~18k) with lots of markup, these regexes were causing enough...
authorMatthew Exon <git.mexon@spamgourmet.com>
Tue, 26 Feb 2013 23:34:40 +0000 (07:34 +0800)
committerMatthew Exon <git.mexon@spamgourmet.com>
Wed, 27 Feb 2013 09:04:07 +0000 (17:04 +0800)
include/bbcode.php

index a587d8c38075e5f6da2dfc066801492d8f6f8eaa..cec13d91977c442fe06a6d22184ffaa8bed43e8b 100644 (file)
@@ -642,8 +642,8 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
        $Text = preg_replace('/\&quot\;/','"',$Text);
 
        // fix any escaped ampersands that may have been converted into links
-       $Text = preg_replace("/\<(.*?)(src|href)=(.*?)\&amp\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text);
-       $Text = preg_replace("/\<(.*?)(src|href)=\"[^hfm](.*?)\>/ism",'<$1$2="">',$Text);
+       $Text = preg_replace("/\<([^>]*?)(src|href)=(.*?)\&amp\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text);
+       $Text = preg_replace("/\<([^>]*?)(src|href)=\"[^hfm](.*?)\>/ism",'<$1$2="">',$Text);
 
        if($saved_image)
                $Text = bb_replace_images($Text, $saved_image);