Skip to content

Commit

Permalink
fix: double encoded URLs (xbapps#1630)
Browse files Browse the repository at this point in the history
* fix: double encoded URLs

fixes covers with URLs that contain encoded characters like "%20"

* refix covers for POVR network
  • Loading branch information
theRealKLH authored Feb 12, 2024
1 parent 98c8ca7 commit 153ec4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 3 additions & 0 deletions ui/src/views/scenes/Details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,9 @@ watch:{
}
try {
if (u.startsWith('http') || u.startsWith('https')) {
if (strpos(u, "%") !== false) {
return '/img/' + size + '/' + decodeURI(u)
}
return '/img/' + size + '/' + encodeURI(u)
} else {
return u
Expand Down
8 changes: 2 additions & 6 deletions ui/src/views/scenes/SceneCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,8 @@ export default {
},
},
methods: {
getImageURL (u) {
if (u.startsWith('http')) {
return '/img/700x/' + encodeURI(u)
} else {
return u
}
getImageURL (u, size) {
return '/img/700x/' + u
},
showDetails (scene) {
// reRead is required when the SceneCard is clicked from the ActorDetails
Expand Down

0 comments on commit 153ec4b

Please sign in to comment.