Commit a30136d2 authored by Agate's avatar Agate 💬

Merge branch '470-url-encoding' into 'develop'

Fix #470: Properly encode Wikipedia and lyrics search urls

Closes #470

See merge request funkwhale/funkwhale!449
parents 3a5a4465 a8f7893d
Pipeline #2265 canceled with stages
in 4 minutes and 14 seconds
Properly encode Wikipedia and lyrics search urls (#470)
......@@ -102,7 +102,7 @@ export default {
}
},
wikipediaUrl () {
return 'https://en.wikipedia.org/w/index.php?search=' + this.album.title + ' ' + this.album.artist.name
return 'https://en.wikipedia.org/w/index.php?search=' + encodeURI(this.album.title + ' ' + this.album.artist.name)
},
musicbrainzUrl () {
return 'https://musicbrainz.org/release/' + this.album.mbid
......
......@@ -151,7 +151,7 @@ export default {
}).length > 0
},
wikipediaUrl () {
return 'https://en.wikipedia.org/w/index.php?search=' + this.artist.name
return 'https://en.wikipedia.org/w/index.php?search=' + encodeURI(this.artist.name)
},
musicbrainzUrl () {
return 'https://musicbrainz.org/artist/' + this.artist.mbid
......
......@@ -196,7 +196,7 @@ export default {
}
},
wikipediaUrl () {
return 'https://en.wikipedia.org/w/index.php?search=' + this.track.title + ' ' + this.track.artist.name
return 'https://en.wikipedia.org/w/index.php?search=' + encodeURI(this.track.title + ' ' + this.track.artist.name)
},
musicbrainzUrl () {
return 'https://musicbrainz.org/recording/' + this.track.mbid
......@@ -211,7 +211,7 @@ export default {
lyricsSearchUrl () {
let base = 'http://lyrics.wikia.com/wiki/Special:Search?query='
let query = this.track.artist.name + ' ' + this.track.title
return base + query
return base + encodeURI(query)
},
cover () {
return null
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment