From 68e58304675c54bb8ca7b601ef1984f221cb3830 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 18 Oct 2023 12:19:47 +0200 Subject: [PATCH] wait #6420 @1 --- resources/linkeditor/js/linkeditor.form.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/linkeditor/js/linkeditor.form.js b/resources/linkeditor/js/linkeditor.form.js index c36c0197a..f2e987e14 100644 --- a/resources/linkeditor/js/linkeditor.form.js +++ b/resources/linkeditor/js/linkeditor.form.js @@ -45,6 +45,14 @@ LinkeditorForm.prototype = { $this.updateLinkForm(); }); + $(document).on('change keyup keydown', '#linkeditor-panel-form [name="uid"]', function () { + let v = $(this).val(); + v = v.replace(/[^a-zA-Z0-9_]*/g, ''); + if (v !== $(this).val()) { + $(this).val(v); + } + return true; + }); setInterval(function () { if ($(document.activeElement).is('.sp-input')) { -- 2.39.5