We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 2f3967fd authored by Daniel Watkins's avatar Daniel Watkins

Fix some bugs in album URL code.

parent 9a00ffa0
......@@ -88,12 +88,10 @@ class Album {
*/
function getURL() {
global $friendly_urls, $base_url;
$artist_encoded = urlencode(stripslashes($this->artistname));
$album_encoded = urlencode(stripslashes($this->name));
if($friendly_urls) {
return $base_url . "/artist/" . $artist_encoded . "/album/" . $album_encoded;
return $base_url . "/artist/" . urlencode(stripslashes($this->artist_name)) . "/album/" . urlencode(stripslashes($this->name));
} else {
return $base_url . "/artist.php?artist=" . $artist_encoded . "&album=" . $album_encoded;
return $base_url . "/artist.php?artist=" . urlencode(stripslashes($this->artist_name)) . "&album=" . urlencode(stripslashes($this->name));
}
}
......
......@@ -150,12 +150,10 @@ class Server {
static function getAlbumURL($artist, $album) {
global $friendly_urls, $base_url;
$artist_encoded = urlencode(stripslashes($artist));
$album_encoded = urlencode(stripslashes($album));
if($friendly_urls) {
return $base_url . "/artist/" . $artist_encoded . "/album/" . $album_encoded;
return $base_url . "/artist/" . urlencode(stripslashes($artist)) . "/album/" . urlencode(stripslashes($album));
} else {
return $base_url . "/artist.php?artist=" . $artist_encoded . "&album=" . $album_encoded;
return $base_url . "/artist.php?artist=" . urlencode(stripslashes($artist)) . "&album=" . urlencode(stripslashes($album));
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment