From 680524f446ac356fe3742466378bce024959f8a2 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Tue, 15 Oct 2013 00:44:46 +0200 Subject: [PATCH] Detecting twitter profiles. This is added for the twitter import --- include/html2plain.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/html2plain.php b/include/html2plain.php index 07de829656..3e4c0e8db0 100644 --- a/include/html2plain.php +++ b/include/html2plain.php @@ -84,11 +84,14 @@ function collecturls($message) { foreach ($result as $treffer) { // A list of some links that should be ignored $list = array("/user/", "/tag/", "/group/", "/profile/", "/search?search=", "/search?tag=", "mailto:", "/u/", "/node/", - "//facebook.com/profile.php?id=", "//plus.google.com/"); + "//facebook.com/profile.php?id=", "//plus.google.com/", "//twitter.com/"); foreach ($list as $listitem) if (strpos($treffer[1], $listitem) !== false) $ignore = true; + if ((strpos($treffer[1], "//twitter.com/") !== false) and (strpos($treffer[1], "/status/") !== false)) + $ignore = false; + if ((strpos($treffer[1], "//plus.google.com/") !== false) and (strpos($treffer[1], "/posts") !== false)) $ignore = false; -- 2.39.5