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

Commit dc68fedf authored by tobyink's avatar tobyink

Correct encoding of <link rel=meta> URLs; add <link rel=meta> to track, artist and album pages.

parent 5fa440e1
......@@ -36,6 +36,15 @@ if (!PEAR::isError($aAlbumTracks )) {
$smarty->assign("tracks", $aAlbumTracks);
}
$smarty->assign('extra_head_links', array(
array(
'rel' => 'meta',
'type' => 'application/rdf+xml' ,
'title' => 'Album Metadata',
'href' => $base_url.'/rdf.php?fmt=xml&page='.urlencode(htmlentities(str_replace($base_url, '', $album>getURL())))
)
));
$smarty->display("album.tpl");
......
......@@ -42,6 +42,15 @@ if (!PEAR::isError($aArtistAlbums)) {
$smarty->assign("albums", $aArtistAlbums);
}
$smarty->assign('extra_head_links', array(
array(
'rel' => 'meta',
'type' => 'application/rdf+xml' ,
'title' => 'FOAF',
'href' => $base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', $artist>getURL()))
)
));
$smarty->display("artist.tpl");
......
......@@ -33,7 +33,7 @@ if (! $_GET['group'])
'rel' => 'meta',
'type' => 'application/rdf+xml' ,
'title' => 'FOAF',
'href' => $base_url.'/rdf.php?fmt=xml&page='.htmlentities($_SERVER['REQUEST_URI'])
'href' => $base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', $_SERVER['REQUEST_URI']))
)
));
$aTagCloud = TagCloud::GenerateTagCloud(TagCloud::scrobblesTable(), 'artist');
......@@ -87,7 +87,7 @@ if(isset($group->name)) {
'rel' => 'meta',
'type' => 'application/rdf+xml' ,
'title' => 'FOAF',
'href' => $base_url.'/rdf.php?fmt=xml&page='.htmlentities($_SERVER['REQUEST_URI'])
'href' => $base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', $_SERVER['REQUEST_URI']))
)
));
......
......@@ -60,7 +60,7 @@ if ($_REQUEST['country'])
'rel' => 'meta',
'type' => 'application/rdf+xml' ,
'title' => 'FOAF',
'href' => $base_url.'/rdf.php?fmt=xml&page='.htmlentities($_SERVER['REQUEST_URI'])
'href' => $base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', $_SERVER['REQUEST_URI']))
)
));
......
......@@ -54,5 +54,14 @@ while (($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC))) {
$smarty->assign("albums", $aOtherAlbums);
$smarty->assign('extra_head_links', array(
array(
'rel' => 'meta',
'type' => 'application/rdf+xml' ,
'title' => 'Track Metadata',
'href' => $base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', $track>getURL()))
)
));
$smarty->display("track.tpl");
?>
......@@ -54,7 +54,7 @@ if(isset($user->name)) {
'rel' => 'meta',
'type' => 'application/rdf+xml' ,
'title' => 'FOAF',
'href' => $base_url.'/rdf.php?fmt=xml&page='.htmlentities(str_replace($base_url, '', $user->getURL('groups')))
'href' => $base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', $user->getURL('groups')))
)
));
......
......@@ -86,7 +86,7 @@ $smarty->assign('extra_head_links', array(
'rel' => 'meta',
'type' => 'application/rdf+xml' ,
'title' => 'FOAF',
'href' => $base_url.'/rdf.php?fmt=xml&page='.htmlentities(str_replace($base_url, '', $user->getURL()))
'href' => $base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', $user->getURL()))
)
));
$smarty->display('user-journal.tpl');
......
......@@ -59,7 +59,7 @@ if(isset($user->name)) {
'rel'=>'alternate',
'type' => 'application/rss+xml' ,
'title' => 'RSS 1.0 Feed (Recent plays)',
'href' => $base_url.'/rdf.php?fmt=rss&page='.htmlentities(str_replace($base_url, '', $user->getURL('recent-tracks')))
'href' => $base_url.'/rdf.php?fmt=rss&page='.urlencode(str_replace($base_url, '', $user->getURL('recent-tracks')))
),
array(
'rel'=>'alternate',
......@@ -71,7 +71,7 @@ if(isset($user->name)) {
'rel' => 'meta',
'type' => 'application/rdf+xml' ,
'title' => 'FOAF',
'href' => $base_url.'/rdf.php?fmt=xml&page='.htmlentities(str_replace($base_url, '', $user->getURL()))
'href' => $base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', $user->getURL()))
)
));
......
......@@ -59,13 +59,13 @@ if(isset($user->name)) {
'rel'=>'alternate',
'type' => 'application/rss+xml' ,
'title' => 'RSS 1.0 Feed (Recent plays)',
'href' => $base_url.'/rdf.php?fmt=rss&page='.htmlentities(str_replace($base_url, '', $user->getURL('recent-tracks')))
'href' => $base_url.'/rdf.php?fmt=rss&page='.urlencode(str_replace($base_url, '', $user->getURL('recent-tracks')))
),
array(
'rel' => 'meta',
'type' => 'application/rdf+xml' ,
'title' => 'FOAF',
'href' => $base_url.'/rdf.php?fmt=xml&page='.htmlentities(str_replace($base_url, '', $user->getURL()))
'href' => $base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', $user->getURL()))
)
));
......
......@@ -63,7 +63,7 @@ if(isset($user->name)) {
'rel' => 'meta',
'type' => 'application/rdf+xml' ,
'title' => 'FOAF',
'href' => $base_url.'/rdf.php?fmt=xml&page='.htmlentities(str_replace($base_url, '', $user->getURL()))
'href' => $base_url.'/rdf.php?fmt=xml&page='.urlencode(str_replace($base_url, '', $user->getURL()))
)
));
......
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