fix issue with encode/decode path string
This commit is contained in:
parent
ab9f048f87
commit
4102fd1ef9
|
@ -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