Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
funkwhale
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Paul Walko
funkwhale
Commits
e8b2b94d
Verified
Commit
e8b2b94d
authored
6 years ago
by
Eliot Berriot
Browse files
Options
Downloads
Patches
Plain Diff
Fixed url escaping for good ;)
parent
d7ea78d2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/funkwhale_api/music/spa_views.py
+5
-2
5 additions, 2 deletions
api/funkwhale_api/music/spa_views.py
api/tests/music/test_spa_views.py
+6
-4
6 additions, 4 deletions
api/tests/music/test_spa_views.py
with
11 additions
and
6 deletions
api/funkwhale_api/music/spa_views.py
+
5
−
2
View file @
e8b2b94d
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
)
)
),
}
)
...
...
This diff is collapsed.
Click to expand it.
api/tests/music/test_spa_views.py
+
6
−
4
View file @
e8b2b94d
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
)
)
)
),
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment