X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapitimelineuser.php;fp=actions%2Fapitimelineuser.php;h=1ec6b74de6ea74bf495f1369820134beefb2c43c;hb=abd90bbdf562614755802885dfb5673645df8575;hp=81b8fcc88f3c5856e1bae420444a8639d42de904;hpb=e8d1bb25469fe1ef0cbcb32c3022010997aca4b0;p=quix0rs-gnu-social.git diff --git a/actions/apitimelineuser.php b/actions/apitimelineuser.php index 81b8fcc88f..1ec6b74de6 100644 --- a/actions/apitimelineuser.php +++ b/actions/apitimelineuser.php @@ -79,6 +79,10 @@ class ApiTimelineUserAction extends ApiBareAuthAction $this->clientError(_('No such user.'), 404); } + if (!$this->target->isLocal()) { + $this->serverError(_('Remote user timelines are not available here yet.'), 501); + } + $this->notices = $this->getNotices(); return true; @@ -405,7 +409,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction // Get (safe!) HTML and text versions of the content - $rendered = $this->purify($sourceContent); + $rendered = common_purify($sourceContent); $content = common_strip_html($rendered); $shortened = $this->auth_user->shortenLinks($content); @@ -504,13 +508,4 @@ class ApiTimelineUserAction extends ApiBareAuthAction return $saved; } - - function purify($content) - { - require_once INSTALLDIR.'/extlib/htmLawed/htmLawed.php'; - - $config = array('safe' => 1, - 'deny_attribute' => 'id,style,on*'); - return htmLawed($content, $config); - } }