v0.1/code-improvements #53

Merged
lamacchinadesiderante merged 10 commits from v0.1/code-improvements into main 2024-04-28 19:53:31 +00:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 4102fd1ef9 - Show all commits

View File

@ -51,9 +51,9 @@ export const removeHttpS = (url: string): string => {
}; };
export const encodeVideoUrlPath = (input: string): string => { export const encodeVideoUrlPath = (input: string): string => {
return input.replace(/^\/+/, '').replace(/\/+$/, '').replace(/\//g, "-"); return encodeURIComponent(input.replace(/^\/+/, ''))
}; };
export const decodeVideoUrlPath = (input: string): string => { export const decodeVideoUrlPath = (input: string): string => {
return `/${input.replace(/^\-+/, '').replace(/\-+$/, '').replace(/\-/g, "/")}`; return `/${decodeURIComponent(input)}`;
}; };