X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fhtml2plain.php;h=839dd70a74437383a01ccdec34bbcad0d66506a7;hb=39927e3dc5d0fc942ef9428b5c5c0d9b8cbb2f56;hp=fe0e3326e81a8ae35bcbc0791931e9dcc738e92a;hpb=953840cf822718cba66a0727b576c674c6e44875;p=friendica.git diff --git a/include/html2plain.php b/include/html2plain.php index fe0e3326e8..839dd70a74 100644 --- a/include/html2plain.php +++ b/include/html2plain.php @@ -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=", "/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 (!$ignore) $urls[$treffer[1]] = $treffer[1]; } @@ -154,7 +157,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", "");