Skip to content

A self-hosted media server and file management system

encode share url to replace spaces with url spaces

aminnausin81e405196e50
diff --git a/resources/js/composables/useMetaData.js b/resources/js/composables/useMetaData.js
index de19c5ca..9480644d 100755
--- a/resources/js/composables/useMetaData.js
+++ b/resources/js/composables/useMetaData.js
@@ -13,14 +13,14 @@ export default function useMetaData(data) {
duration: toFormattedDuration(data?.duration) ?? 'N/A',
views: data?.view_count ? `${data?.view_count} View${data?.view_count !== 1 ? 's' : ''}` : '0 Views',
description: data.description ?? '',
- url: (data?.skipBaseURL ? '' : document.location.origin) + route.path + `?video=${data.id}`,
+ url: encodeURI((data?.skipBaseURL ? '' : document.location.origin) + route.path + `?video=${data.id}`),
},
updateData(props){
this.fields.title = props?.title ?? props?.name,
this.fields.duration = toFormattedDuration(props?.duration) ?? 'N/A',
this.fields.views = props?.view_count ? `${props?.view_count} View${props?.view_count !== 1 ? 's' : ''}` : '0 Views',
this.fields.description = props?.description ?? '',
- this.fields.url = (props?.skipBaseURL ? '' : document.location.origin) + route.path + `?video=${props.id}`
+ this.fields.url = encodeURI((props?.skipBaseURL ? '' : document.location.origin) + route.path + `?video=${props.id}`)
}
});
}
\ No newline at end of file