X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Flike.php;h=5ea30a3ffef985ba5d8cc27d4f091588f173341a;hb=5e60fa8210b502797209de770780d6d7ba81b86c;hp=296e563bf466127fa77e86838f9d0de39497459f;hpb=dbe49a0c1ad0467c2e12e363aac5635a1f11a3ea;p=friendica.git diff --git a/mod/like.php b/mod/like.php index 296e563bf4..5ea30a3ffe 100644 --- a/mod/like.php +++ b/mod/like.php @@ -3,6 +3,7 @@ use Friendica\App; use Friendica\Core\System; use Friendica\Model\Item; +use Friendica\Util\Strings; require_once 'include/items.php'; @@ -12,13 +13,13 @@ function like_content(App $a) { } - $verb = notags(trim($_GET['verb'])); + $verb = Strings::escapeTags(trim($_GET['verb'])); if (!$verb) { $verb = 'like'; } - $item_id = (($a->argc > 1) ? notags(trim($a->argv[1])) : 0); + $item_id = (($a->argc > 1) ? Strings::escapeTags(trim($a->argv[1])) : 0); $r = Item::performLike($item_id, $verb); if (!$r) { @@ -26,7 +27,7 @@ function like_content(App $a) { } // See if we've been passed a return path to redirect to - $return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : ''); + $return_path = defaults($_REQUEST, 'return', ''); like_content_return($a, $return_path); killme(); // NOTREACHED