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

Commit 40634541 authored by clint's avatar clint

do the escaping of the track url in the smarty template

parent 128d733f
......@@ -294,9 +294,9 @@ class Server {
static function getTrackURL($artist, $album, $track) {
global $friendly_urls, $base_url;
if($friendly_urls) {
return $base_url . "/artist/" . urlencode(stripslashes($artist)) . "/album/" . urlencode(stripslashes($album)) . "/track/" . urlencode(stripslashes($track));
return $base_url . "/artist/" . ($artist) . "/album/" . ($album) . "/track/" . ($track);
} else {
return $base_url . "/track.php?artist=" . urlencode(stripslashes($artist)) . "&album=" . urlencode(stripslashes($album)) . "&track=" . urlencode(stripslashes($track));
return $base_url . "/track.php?artist=" . ($artist) . "&album=" . ($album) . "&track=" . ($track);
}
}
......
......@@ -21,7 +21,7 @@
<ul id="tracks">
{section name=i loop=$tracks}
<li>
<a href="{$tracks[i]->getURL()}">{$tracks[i]->name}</a>
<a href="{$tracks[i]->getURL()|escape:'url':'UTF-8'}">{$tracks[i]->name}</a>
</li>
{/section}
</ul>
......
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