]> git.mxchange.org Git - friendica.git/commitdiff
Several improvements
authorMichael Vogel <icarus@dabo.de>
Sat, 31 Mar 2012 14:28:39 +0000 (16:28 +0200)
committerMichael Vogel <icarus@dabo.de>
Sat, 31 Mar 2012 14:28:39 +0000 (16:28 +0200)
include/bbcode.php
include/html2plain.php

index 9befbd0f7963a390a2c76776e3989d3aa803b12f..3697f1fc5d1dccbea26eb3c06f561e5e83edf60b 100644 (file)
@@ -230,7 +230,8 @@ function bbcode($Text,$preserve_nl = false) {
                                     $Text);
 
        // [img=widthxheight]image source[/img]
-       $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '<img src="$3" style="height: $2px; width: $1px;" >', $Text);
+       //$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '<img src="$3" style="height: $2px; width: $1px;" >', $Text);
+       $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '<img src="$3" style="width: $1px;" >', $Text);
 
        // Images
        // [img]pathtoimage[/img]
index fe0e3326e81a8ae35bcbc0791931e9dcc738e92a..7aa20500a57a1ad2594fa4f489743035dc343ebb 100644 (file)
@@ -83,12 +83,15 @@ function collecturls($message) {
        $urls = array();
        foreach ($result as $treffer) {
                // A list of some links that should be ignored
-               $list = array("/user/", "/tag/", "/profile/", "/search?search=", "mailto:", "/u/", "/node/",
+               $list = array("/user/", "/tag/", "/group/", "/profile/", "/search?search=", "mailto:", "/u/", "/node/",
                                "//facebook.com/profile.php?id=", "//plus.google.com/");
                foreach ($list as $listitem)
                        if (strpos($treffer[1], $listitem) !== false)
                                $ignore = true;
 
+               if ((strpos($treffer[1], "//plus.google.com/") !== false) and (strpos($treffer[1], "/posts") !== false))
+                               $ignore = false;
+
                if (!$ignore)
                        $urls[$treffer[1]] = $treffer[1];
        }