X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Foexchange.php;h=7de4acadfeb3043f63131eac4678fa45b7d7a27a;hb=7789ea25079801ee1425368e9bf2f7ce80d16d88;hp=97367c3ea5f964ff0b9c25c5912770e90825caf5;hpb=d09b3f5bdeae444f785f6283e55dbf2f61caadac;p=friendica.git diff --git a/mod/oexchange.php b/mod/oexchange.php index 97367c3ea5..7de4acadfe 100644 --- a/mod/oexchange.php +++ b/mod/oexchange.php @@ -1,6 +1,6 @@ argc > 1) && $a->argv[1] === 'done') { - info(DI::l10n()->t('Post successful.') . EOL); 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 = Network::fetchUrl(DI::baseUrl() . '/parse_url?url=' . $url . $title . $description . $tags); + $s = \Friendica\Content\Text\BBCode::embedURL($url, true, $title, $description, $tags); if (!strlen($s)) { return;