X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fhtml2plain.php;h=4afac41d8316267b78198d2ed054ea686497a3ce;hb=1d6dd1666f4fc5da64447a48e158f8755d1d2a1b;hp=fe0e3326e81a8ae35bcbc0791931e9dcc738e92a;hpb=bdd275474044152a5d9a33ea6b8a8071b931d27e;p=friendica.git diff --git a/include/html2plain.php b/include/html2plain.php index fe0e3326e8..4afac41d83 100644 --- a/include/html2plain.php +++ b/include/html2plain.php @@ -83,12 +83,18 @@ 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=", "/search?tag=", "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 ((strpos($treffer[1], "//plus.google.com/") !== false) and (strpos($treffer[1], "/photos") !== false)) + $ignore = false; + if (!$ignore) $urls[$treffer[1]] = $treffer[1]; } @@ -154,7 +160,7 @@ function html2plain($html, $wraplength = 75, $compact = false) //node2bbcode($doc, 'ol', array(), "\n[list=1]", "[/list]\n"); node2bbcode($doc, 'li', array(), "\n* ", "\n"); - node2bbcode($doc, 'hr', array(), str_repeat("-", 70), ""); + node2bbcode($doc, 'hr', array(), "\n".str_repeat("-", 70)."\n", ""); node2bbcode($doc, 'tr', array(), "\n", ""); node2bbcode($doc, 'td', array(), "\t", "");