]> git.mxchange.org Git - friendica.git/blobdiff - mod/oexchange.php
Issue 9948: Remove "@" from full text search
[friendica.git] / mod / oexchange.php
index f68fe6f2d2dbd09bf25f0a4ca98bb1a8282f1334..e3ef01cc4d5193d9341d377f66743fa2c5a44e90 100644 (file)
@@ -47,16 +47,12 @@ function oexchange_content(App $a) {
                return;
        }
 
-       $url = ((!empty($_REQUEST['url']))
-               ? urlencode(Strings::escapeTags(trim($_REQUEST['url']))) : '');
-       $title = ((!empty($_REQUEST['title']))
-               ? '&title=' . urlencode(Strings::escapeTags(trim($_REQUEST['title']))) : '');
-       $description = ((!empty($_REQUEST['description']))
-               ? '&description=' . urlencode(Strings::escapeTags(trim($_REQUEST['description']))) : '');
-       $tags = ((!empty($_REQUEST['tags']))
-               ? '&tags=' . urlencode(Strings::escapeTags(trim($_REQUEST['tags']))) : '');
+       $url         = !empty($_REQUEST['url'])         ? trim($_REQUEST['url'])         : '';
+       $title       = !empty($_REQUEST['title'])       ? trim($_REQUEST['title'])       : '';
+       $description = !empty($_REQUEST['description']) ? trim($_REQUEST['description']) : '';
+       $tags        = !empty($_REQUEST['tags'])        ? trim($_REQUEST['tags'])        : '';
 
-       $s = DI::httpRequest()->fetch(DI::baseUrl() . '/parse_url?url=' . $url . $title . $description . $tags);
+       $s = \Friendica\Content\Text\BBCode::embedURL($url, true, $title, $description, $tags);
 
        if (!strlen($s)) {
                return;