use new sanitizeHTML() function
This commit is contained in:
parent
13a9ef36fb
commit
8d89bba07c
2 changed files with 8 additions and 8 deletions
|
@ -97,13 +97,13 @@ Collection={
|
||||||
if(artist.name && artist.songs.length>0){
|
if(artist.name && artist.songs.length>0){
|
||||||
var tr=template.clone().removeClass('template');
|
var tr=template.clone().removeClass('template');
|
||||||
if(artist.songs.length>1){
|
if(artist.songs.length>1){
|
||||||
tr.find('td.title a').text(artist.songs.length+' '+t('media','songs'));
|
tr.find('td.title a').html(artist.songs.length+' '+t('media','songs'));
|
||||||
tr.find('td.album a').text(artist.albums.length+' '+t('media','albums'));
|
tr.find('td.album a').html(artist.albums.length+' '+t('media','albums'));
|
||||||
}else{
|
}else{
|
||||||
tr.find('td.title a').text(artist.songs[0].name);
|
tr.find('td.title a').html(artist.songs[0].name);
|
||||||
tr.find('td.album a').text(artist.albums[0].name);
|
tr.find('td.album a').html(artist.albums[0].name);
|
||||||
}
|
}
|
||||||
tr.find('td.artist a').text(artist.name);
|
tr.find('td.artist a').html(artist.name);
|
||||||
tr.data('artistData',artist);
|
tr.data('artistData',artist);
|
||||||
tr.find('td.artist a').click(function(event){
|
tr.find('td.artist a').click(function(event){
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
|
@ -79,19 +79,19 @@ class OC_MEDIA_SCANNER{
|
||||||
OCP\Util::writeLog('media',"error reading artist tag in '$file'",OCP\Util::WARN);
|
OCP\Util::writeLog('media',"error reading artist tag in '$file'",OCP\Util::WARN);
|
||||||
$artist='unknown';
|
$artist='unknown';
|
||||||
}else{
|
}else{
|
||||||
$artist=strip_tags(stripslashes($data['comments']['artist'][0]));
|
$artist=OCP\Util::sanitizeHTML(stripslashes($data['comments']['artist'][0]));
|
||||||
}
|
}
|
||||||
if(!isset($data['comments']['album'])){
|
if(!isset($data['comments']['album'])){
|
||||||
OCP\Util::writeLog('media',"error reading album tag in '$file'",OCP\Util::WARN);
|
OCP\Util::writeLog('media',"error reading album tag in '$file'",OCP\Util::WARN);
|
||||||
$album='unknown';
|
$album='unknown';
|
||||||
}else{
|
}else{
|
||||||
$album=strip_tags(stripslashes($data['comments']['album'][0]));
|
$album=OCP\Util::sanitizeHTML(stripslashes($data['comments']['album'][0]));
|
||||||
}
|
}
|
||||||
if(!isset($data['comments']['title'])){
|
if(!isset($data['comments']['title'])){
|
||||||
OCP\Util::writeLog('media',"error reading title tag in '$file'",OCP\Util::WARN);
|
OCP\Util::writeLog('media',"error reading title tag in '$file'",OCP\Util::WARN);
|
||||||
$title='unknown';
|
$title='unknown';
|
||||||
}else{
|
}else{
|
||||||
$title=strip_tags(stripslashes($data['comments']['title'][0]));
|
$title=OCP\Util::sanitizeHTML(stripslashes($data['comments']['title'][0]));
|
||||||
}
|
}
|
||||||
$size=$data['filesize'];
|
$size=$data['filesize'];
|
||||||
if (isset($data['comments']['track']))
|
if (isset($data['comments']['track']))
|
||||||
|
|
Loading…
Reference in a new issue