]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Text/HTML.php
Improved code / updated messages.po
[friendica.git] / src / Content / Text / HTML.php
index 3f9ef7c3b4c251ed9195030338efce61b0e2b525..5ad66e85ea2c941a6a857236d8594bc94c4616d5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2023, the Friendica project
+ * @copyright Copyright (C) 2010-2024, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -24,7 +24,6 @@ namespace Friendica\Content\Text;
 use DOMDocument;
 use DOMXPath;
 use Friendica\Protocol\HTTP\MediaType;
-use Friendica\Content\Widget\ContactBlock;
 use Friendica\Core\Hook;
 use Friendica\Core\Renderer;
 use Friendica\Core\Search;
@@ -423,7 +422,8 @@ class HTML
        {
                $URLSearchString = "^\[\]";
 
-               $matches = ["/\[url\=([$URLSearchString]*)\].*?\[\/url\]/ism",
+               $matches = [
+                       "/\[url\=([$URLSearchString]*)\].*?\[\/url\]/ism",
                        "/\[url\]([$URLSearchString]*)\[\/url\]/ism",
                        "/\[img\=[0-9]*x[0-9]*\](.*?)\[\/img\]/ism",
                        "/\[img\](.*?)\[\/img\]/ism",
@@ -532,8 +532,10 @@ class HTML
                        $ignore = false;
 
                        // A list of some links that should be ignored
-                       $list = ["/user/", "/tag/", "/group/", "/profile/", "/search?search=", "/search?tag=", "mailto:", "/u/", "/node/",
-                               "//plus.google.com/", "//twitter.com/"];
+                       $list = [
+                               "/user/", "/tag/", "/group/", "/circle/", "/profile/", "/search?search=", "/search?tag=", "mailto:", "/u/", "/node/",
+                               "//plus.google.com/", "//twitter.com/"
+                       ];
                        foreach ($list as $listitem) {
                                if (strpos($treffer[1], $listitem) !== false) {
                                        $ignore = true;
@@ -862,7 +864,7 @@ class HTML
                        '$id'           => $id,
                        '$search_label' => DI::l10n()->t('Search'),
                        '$save_label'   => $save_label,
-                       '$search_hint'  => DI::l10n()->t('@name, !forum, #tags, content'),
+                       '$search_hint'  => DI::l10n()->t('@name, !group, #tags, content'),
                        '$mode'         => $mode,
                        '$return_url'   => urlencode(Search::getSearchPath($s)),
                ];
@@ -875,7 +877,7 @@ class HTML
                        ];
 
                        if (DI::config()->get('system', 'poco_local_search')) {
-                               $values['$searchoption']['forums'] = DI::l10n()->t('Forums');
+                               $values['$searchoption']['groups'] = DI::l10n()->t('Groups');
                        }
                }
 
@@ -942,7 +944,8 @@ class HTML
                        $domain = '(?:(?!-)[A-Za-z0-9-]{1,63}(?<!-)\.)*' . preg_quote(trim($domain, '/'), '%');
                });
 
-               $config->set('URI.SafeIframeRegexp',
+               $config->set(
+                       'URI.SafeIframeRegexp',
                        '%^https://(?:
                                ' . implode('|', $allowedIframeDomains) . '
                        )
@@ -1051,7 +1054,8 @@ class HTML
                        if (isset($mediaType->parameters['charset'])) {
                                return strtolower($mediaType->parameters['charset']);
                        }
-               } catch(\InvalidArgumentException $e) {}
+               } catch (\InvalidArgumentException $e) {
+               }
 
                return null;
        }