summaryrefslogtreecommitdiffstats
path: root/apps/media/lib_ampache.php
diff options
context:
space:
mode:
authorWeng Xuetian <wengxt@gmail.com>2011-10-24 16:43:18 +0000
committerRobin Appelman <icewind1991@gmail.com>2011-11-18 14:03:26 +0100
commit96b91e5b0b54a9070eec55949d4ff13163b25d8c (patch)
tree5b1075bfd0e2edf4dad25c28046a0b652dce10c1 /apps/media/lib_ampache.php
parent0d274b0268fc3ffa98775e5e34f35bd50c019707 (diff)
downloadnextcloud-server-96b91e5b0b54a9070eec55949d4ff13163b25d8c.tar.gz
nextcloud-server-96b91e5b0b54a9070eec55949d4ff13163b25d8c.zip
fix ampache encoding problem. use htmlentities encoding parameter directly.
Diffstat (limited to 'apps/media/lib_ampache.php')
-rw-r--r--apps/media/lib_ampache.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/media/lib_ampache.php b/apps/media/lib_ampache.php
index 0ad84d66809..bb468d55955 100644
--- a/apps/media/lib_ampache.php
+++ b/apps/media/lib_ampache.php
@@ -128,7 +128,7 @@ class OC_MEDIA_AMPACHE{
$albums=count(OC_MEDIA_COLLECTION::getAlbums($artist['artist_id']));
$songs=count(OC_MEDIA_COLLECTION::getSongs($artist['artist_id']));
$id=$artist['artist_id'];
- $name=utf8_decode(htmlentities($artist['artist_name']));
+ $name=htmlentities($artist['artist_name'], ENT_COMPAT | ENT_HTML401, 'UTF-8');
echo("\t<artist id='$id'>\n");
echo("\t\t<name>$name</name>\n");
echo("\t\t<albums>$albums</albums>\n");
@@ -142,10 +142,10 @@ class OC_MEDIA_AMPACHE{
if(!$artistName){
$artistName=OC_MEDIA_COLLECTION::getArtistName($album['album_artist']);
}
- $artistName=utf8_decode(htmlentities($artistName));
+ $artistName=htmlentities($artistName, ENT_COMPAT | ENT_HTML401, 'UTF-8');
$songs=count(OC_MEDIA_COLLECTION::getSongs($album['album_artist'],$album['album_id']));
$id=$album['album_id'];
- $name=utf8_decode(htmlentities($album['album_name']));
+ $name=htmlentities($album['album_name'], ENT_COMPAT | ENT_HTML401, 'UTF-8');
$artist=$album['album_artist'];
echo("\t<album id='$id'>\n");
echo("\t\t<name>$name</name>\n");
@@ -163,10 +163,10 @@ class OC_MEDIA_AMPACHE{
if(!$albumName){
$albumName=OC_MEDIA_COLLECTION::getAlbumName($song['song_album']);
}
- $artistName=utf8_decode(htmlentities($artistName));
- $albumName=utf8_decode(htmlentities($albumName));
+ $artistName=htmlentities($artistName, ENT_COMPAT | ENT_HTML401, 'UTF-8');
+ $albumName=htmlentities($albumName, ENT_COMPAT | ENT_HTML401, 'UTF-8');
$id=$song['song_id'];
- $name=utf8_decode(htmlentities($song['song_name']));
+ $name=htmlentities($song['song_name'], ENT_COMPAT | ENT_HTML401, 'UTF-8');
$artist=$song['song_artist'];
$album=$song['song_album'];
echo("\t<song id='$id'>\n");