use rtrim

This commit is contained in:
Tobias Diekershoff 2021-08-19 06:57:46 +02:00
parent 81fce72efe
commit a843e96c1f

View file

@ -37,10 +37,7 @@ function nitter_install()
*/ */
function nitter_addon_admin_post(App $a) function nitter_addon_admin_post(App $a)
{ {
$nitterserver = trim($_POST['nitterserver']); $nitterserver = rtrim(trim($_POST['nitterserver']),'/');
if ((substr($apiurl, -1) == '/')) {
$apiurl = substr($apiurl, 0, -1);
}
DI::config()->set('nitter', 'server', $nitterserver); DI::config()->set('nitter', 'server', $nitterserver);
} }