Skip to content

Commit

Permalink
Added filtration of <> symbols before fetch from lyricwiki
Browse files Browse the repository at this point in the history
  • Loading branch information
FreeleX committed Sep 28, 2012
1 parent 87c6069 commit fd76fd5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chrome/content/jscripts/fetch.js
Expand Up @@ -856,6 +856,9 @@ mlyrics.fetch = {
// ====================
LWIKI: {
getUrl: function (artist, album, track) {
artist = artist.replace(/ *\> */g, ""); artist = artist.replace(/ *\< */g, "");
album = album.replace(/ *\> */g, ""); album = album.replace(/ *\< */g, "");
track = track.replace(/ *\> */g, ""); track = track.replace(/ *\< */g, "");
var url = "http://lyrics.wikia.com/api.php?action=lyrics&fmt=json&func=getSong&artist=" + encodeURIComponent( this.getCleanStr(artist) ) +
"&song=" + encodeURIComponent( this.getCleanStr(track) );
return url;
Expand Down

0 comments on commit fd76fd5

Please sign in to comment.