Ticket #2750: genre-utf8.patch

File genre-utf8.patch, 919 bytes (added by otto at kolsi dot fi, 14 years ago)
  • modules/music/mp3act_functions.php

     
    411411
    412412    case 'genre':
    413413      $output = '<div class="head">
    414         <h2 class="music">'.t('Songs for Genre')." '".$itemid."'</h2></div>
     414        <h2 class="music">'.t('Songs for Genre')." '".utf8_encode($itemid)."'</h2></div>
    415415        <p><strong>".t('Songs').'</strong></p>
    416416        <ul class="music">';
    417417
     
    419419        'FROM music_songs '.
    420420        'LEFT JOIN music_artists ON music_songs.artist_id=music_artists.artist_id '.
    421421        'LEFT JOIN music_genres ON music_songs.genre_id=music_genres.genre_id '.
    422         'WHERE genre='.$sql_itemid.';';
     422        'WHERE genre='.utf8_encode($sql_itemid).';';
    423423
    424424      $result = mysql_query($query);
    425425      if (!$result)