diff --git a/index.php b/index.php index 6683a68..5a10201 100644 --- a/index.php +++ b/index.php @@ -41,20 +41,20 @@ if(substr($game['url'],0,4)=='http'){ if($game['fileSize']>0){ $json[] = [ - 'url'=>$game['url'].'#'.(str_replace('#','',$game['filename'])), + 'url'=>$game['url'].'#'.urlencode(str_replace('#','',$game['filename'])), 'size'=>intval($game['fileSize']) ]; }else{ - $json[] = $game['url'].'#'.(str_replace('#','',$game['filename'])); + $json[] = $game['url'].'#'.urlencode(str_replace('#','',$game['filename'])); } }else{ if($game['fileSize']>0){ $json[] = [ - 'url'=>'https://docs.google.com/uc?export=download&id='.$game['url'].'#'.(str_replace('#','',$game['filename'])), + 'url'=>'https://docs.google.com/uc?export=download&id='.$game['url'].'#'.urlencode(str_replace('#','',$game['filename'])), 'size'=>intval($game['fileSize']) ]; }else{ - $json[] = 'https://docs.google.com/uc?export=download&id='.$game['url'].'#'.(str_replace('#','',$game['filename'])); + $json[] = 'https://docs.google.com/uc?export=download&id='.$game['url'].'#'.urlencode(str_replace('#','',$game['filename'])); } } }