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 = $('