kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
Fixed url escaping for good ;)
rodzic
d7ea78d2bf
commit
e8b2b94df4
|
@ -1,3 +1,5 @@
|
|||
import urllib.parse
|
||||
|
||||
from django.conf import settings
|
||||
from django.urls import reverse
|
||||
|
||||
|
@ -58,6 +60,7 @@ def library_track(request, pk):
|
|||
"content": utils.join_url(settings.FUNKWHALE_URL, obj.listen_url),
|
||||
}
|
||||
)
|
||||
|
||||
metas.append(
|
||||
{
|
||||
"tag": "link",
|
||||
|
@ -65,7 +68,7 @@ def library_track(request, pk):
|
|||
"type": "application/json+oembed",
|
||||
"href": (
|
||||
utils.join_url(settings.FUNKWHALE_URL, reverse("api:v1:oembed"))
|
||||
+ "?url={}&format=json".format(track_url)
|
||||
+ "?format=json&url={}".format(urllib.parse.quote_plus(track_url))
|
||||
),
|
||||
}
|
||||
)
|
||||
|
@ -124,7 +127,7 @@ def library_album(request, pk):
|
|||
"type": "application/json+oembed",
|
||||
"href": (
|
||||
utils.join_url(settings.FUNKWHALE_URL, reverse("api:v1:oembed"))
|
||||
+ "?url={}&format=json".format(album_url)
|
||||
+ "?format=json&url={}".format(urllib.parse.quote_plus(album_url))
|
||||
),
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import urllib.parse
|
||||
|
||||
from django.urls import reverse
|
||||
|
||||
from funkwhale_api.common import utils
|
||||
|
@ -61,8 +63,8 @@ def test_library_track(spa_html, no_api_auth, client, factories, settings):
|
|||
"type": "application/json+oembed",
|
||||
"href": (
|
||||
utils.join_url(settings.FUNKWHALE_URL, reverse("api:v1:oembed"))
|
||||
+ "?url={}&format=json".format(
|
||||
utils.join_url(settings.FUNKWHALE_URL, url)
|
||||
+ "?format=json&url={}".format(
|
||||
urllib.parse.quote_plus(utils.join_url(settings.FUNKWHALE_URL, url))
|
||||
)
|
||||
),
|
||||
},
|
||||
|
@ -115,8 +117,8 @@ def test_library_album(spa_html, no_api_auth, client, factories, settings):
|
|||
"type": "application/json+oembed",
|
||||
"href": (
|
||||
utils.join_url(settings.FUNKWHALE_URL, reverse("api:v1:oembed"))
|
||||
+ "?url={}&format=json".format(
|
||||
utils.join_url(settings.FUNKWHALE_URL, url)
|
||||
+ "?format=json&url={}".format(
|
||||
urllib.parse.quote_plus(utils.join_url(settings.FUNKWHALE_URL, url))
|
||||
)
|
||||
),
|
||||
},
|
||||
|
|
Ładowanie…
Reference in New Issue