diff --git a/CHANGELOG.md b/CHANGELOG.md index 844cbef..fb47cb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,20 @@ This file covers the 4.x line (Silverstripe 4 and 5). Later releases are documented on `main`. +## 4.0.18 (2026-11-02) + +### Fixed + +- **The attributes of a shortcode selected in the editor are parsed without creating DOM nodes.** + Opening the dialog on a selected shortcode built it as an element in the CMS document to read its + attributes. They are now parsed in an inert document; values, entities and lower-cased attribute + names come out as before. Upgrading is recommended. +- **Shortcode names with digits are matched whole** (#11). The placeholder pattern stopped a name at + its first digit, so `[year2]` was taken for `[year]` with an attribute `2` and saved back as + `[year 2]`, and a registered name such as `h2_title` got no placeholder. Names are now matched as + Silverstripe's `ShortcodeParser` matches them (`\w+`, ending at whitespace or `]`). A shortcode + without attributes has no trailing space in its placeholder title any more. + ## 4.0.17 ### Fixed diff --git a/client/dist/js/shortcodable.js b/client/dist/js/shortcodable.js index 45713f8..34942b2 100644 --- a/client/dist/js/shortcodable.js +++ b/client/dist/js/shortcodable.js @@ -1 +1 @@ -(()=>{var e,o={448:()=>{var e;e=jQuery,shortcodable={controller_url:"admin/shortcodable",initialized:!1,savedBookmark:null,init:function(){this.initialized=!0,e("body").on("change","select.shortcode-type",(function(o){e.post(shortcodable.controller_url,e(this).parents("form").serializeArray(),(function(o){simpler.modal.bodyHtml=e("#xhr_buffer").html(o).html()})).fail((function(e){shortcodable.handleErrorResponse(e)}))})),e("body").on("submit","#Form_ShortcodeForm",(function(e){return e.preventDefault(),shortcodable.insertShortcode(),simpler.modal.show=!1,!1}))},openDialog:function(){shortcodable.savedBookmark=tinyMCE.activeEditor.selection.isCollapsed()?null:tinyMCE.activeEditor.selection.getBookmark(2),simpler.modal.show=!0,simpler.modal.title="Insert/edit shortcode",simpler.modal.closeBtn=!1,simpler.modal.closeTxt="Close",simpler.modal.saveBtn=!1,simpler.modal.saveTxt="Insert shortcode",simpler.modal.bodyHtml=simpler.spinner,e.post(shortcodable.controller_url,shortcodable.getCurrentEditorSelectionAsParsedShortcodeData(),(function(o){simpler.modal.bodyHtml=e("#xhr_buffer").html(o).html()})).fail((function(e){shortcodable.handleErrorResponse(e)}))},handleErrorResponse:function(e){var o=e.responseText.split('