v0.1/code-improvements #53
|
@ -51,9 +51,9 @@ export const removeHttpS = (url: string): string => {
|
|||
};
|
||||
|
||||
export const encodeVideoUrlPath = (input: string): string => {
|
||||
return input.replace(/^\/+/, '').replace(/\/+$/, '').replace(/\//g, "-");
|
||||
return encodeURIComponent(input.replace(/^\/+/, ''))
|
||||
};
|
||||
|
||||
export const decodeVideoUrlPath = (input: string): string => {
|
||||
return `/${input.replace(/^\-+/, '').replace(/\-+$/, '').replace(/\-/g, "/")}`;
|
||||
return `/${decodeURIComponent(input)}`;
|
||||
};
|
Loading…
Reference in New Issue