diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2012-06-20 12:23:26 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2012-06-20 17:00:33 +0200 |
commit | 0e61b5457b0a54cfc3433f07c9d65a14bdb90498 (patch) | |
tree | eae7a9228cad632952bef56b1065a4dbf9c86b02 /apps/media | |
parent | 902c649dad7a0bd1f5f2d0ec87953f0f059a67d8 (diff) | |
download | nextcloud-server-0e61b5457b0a54cfc3433f07c9d65a14bdb90498.tar.gz nextcloud-server-0e61b5457b0a54cfc3433f07c9d65a14bdb90498.zip |
use new sanitizeHTML() function
Diffstat (limited to 'apps/media')
-rw-r--r-- | apps/media/js/collection.js | 10 | ||||
-rw-r--r-- | apps/media/lib_scanner.php | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/apps/media/js/collection.js b/apps/media/js/collection.js index 03d577c7c98..161fc0c6810 100644 --- a/apps/media/js/collection.js +++ b/apps/media/js/collection.js @@ -97,13 +97,13 @@ Collection={ if(artist.name && artist.songs.length>0){ var tr=template.clone().removeClass('template'); if(artist.songs.length>1){ - tr.find('td.title a').text(artist.songs.length+' '+t('media','songs')); - tr.find('td.album a').text(artist.albums.length+' '+t('media','albums')); + tr.find('td.title a').html(artist.songs.length+' '+t('media','songs')); + tr.find('td.album a').html(artist.albums.length+' '+t('media','albums')); }else{ - tr.find('td.title a').text(artist.songs[0].name); - tr.find('td.album a').text(artist.albums[0].name); + tr.find('td.title a').html(artist.songs[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.find('td.artist a').click(function(event){ event.preventDefault(); diff --git a/apps/media/lib_scanner.php b/apps/media/lib_scanner.php index 82170e5ca82..a8218c3a4d0 100644 --- a/apps/media/lib_scanner.php +++ b/apps/media/lib_scanner.php @@ -79,19 +79,19 @@ class OC_MEDIA_SCANNER{ OCP\Util::writeLog('media',"error reading artist tag in '$file'",OCP\Util::WARN); $artist='unknown'; }else{ - $artist=strip_tags(stripslashes($data['comments']['artist'][0])); + $artist=OCP\Util::sanitizeHTML(stripslashes($data['comments']['artist'][0])); } if(!isset($data['comments']['album'])){ OCP\Util::writeLog('media',"error reading album tag in '$file'",OCP\Util::WARN); $album='unknown'; }else{ - $album=strip_tags(stripslashes($data['comments']['album'][0])); + $album=OCP\Util::sanitizeHTML(stripslashes($data['comments']['album'][0])); } if(!isset($data['comments']['title'])){ OCP\Util::writeLog('media',"error reading title tag in '$file'",OCP\Util::WARN); $title='unknown'; }else{ - $title=strip_tags(stripslashes($data['comments']['title'][0])); + $title=OCP\Util::sanitizeHTML(stripslashes($data['comments']['title'][0])); } $size=$data['filesize']; if (isset($data['comments']['track'])) |