mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 08:22:24 +01:00
fix (sharedlink): custom url regexp bug
This commit is contained in:
parent
15ddd6be2e
commit
efad2a675d
1 changed files with 1 additions and 1 deletions
|
|
@ -297,7 +297,7 @@ async function ctrlCreateShare(render, { save, formState }) {
|
|||
};
|
||||
// sync editable custom link input with link id
|
||||
effect(rxjs.fromEvent(qs($form, `[name="url"]`), "keyup").pipe(rxjs.tap((e) => {
|
||||
id = e.target.value.replaceAll(" ", "-").replace(new RegExp("[^A-Za-z\-]"), "");
|
||||
id = e.target.value.replaceAll(new RegExp("[^0-9A-Za-z\-]", "g"), "");
|
||||
qs(assert.type($form.closest(".component_share"), HTMLElement), `input[name="create"]`).value = `${location.origin}${toHref("/s/" + id)}`;
|
||||
})));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue