fix: escape special characters in preview url (closes #1002)

pull/1051/head
Oleg Lobanov 2020-07-28 11:19:45 +02:00
parent a722bcc13f
commit c9340af8d0
No known key found for this signature in database
GPG Key ID: 7CC64E41212621B0
1 changed files with 3 additions and 3 deletions

View File

@ -99,13 +99,13 @@ export default {
return (this.nextLink !== '')
},
download () {
return `${baseURL}/api/raw${this.req.path}?auth=${this.jwt}`
return `${baseURL}/api/raw${escape(this.req.path)}?auth=${this.jwt}`
},
previewUrl () {
if (this.req.type === 'image') {
return `${baseURL}/api/preview/big${this.req.path}?auth=${this.jwt}`
return `${baseURL}/api/preview/big${escape(this.req.path)}?auth=${this.jwt}`
}
return `${baseURL}/api/raw${this.req.path}?auth=${this.jwt}`
return `${baseURL}/api/raw${escape(this.req.path)}?auth=${this.jwt}`
},
raw () {
return `${this.previewUrl}&inline=true`