From c371873b7e30e475fb49a599234aef8ef4a78aa5 Mon Sep 17 00:00:00 2001 From: zadam Date: Thu, 17 Sep 2020 14:41:00 +0200 Subject: [PATCH] support unicode in button names, closes #1250 --- src/public/app/services/frontend_script_api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/public/app/services/frontend_script_api.js b/src/public/app/services/frontend_script_api.js index f7e3c07a0..6f0601d3a 100644 --- a/src/public/app/services/frontend_script_api.js +++ b/src/public/app/services/frontend_script_api.js @@ -87,7 +87,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain * @param {ToolbarButtonOptions} opts */ this.addButtonToToolbar = opts => { - const buttonId = "toolbar-button-" + opts.title.replace(/[^a-zA-Z0-9]/g, "-"); + const buttonId = "toolbar-button-" + opts.title.replace(/\s/g, "-"); const button = $('