- Issue created by @fraserthompson
- 🇳🇿New Zealand fraserthompson Dunedin, New Zealand
Strips shortcodes if shortcode module is installed
- 🇺🇸United States markie Albuquerque, NM
Thanks for the patch. Can you please create a merge request?
- Status changed to Needs review
about 1 month ago 7:53pm 13 August 2025 - 🇮🇪Ireland lostcarpark
This looks a useful addition.
However, the regex replacement is always applied if the Shortcode module is enabled, regardless of which text format is being used. If shortcodes are only enabled on one text format, it shouldn't affect other formats.
Also, it seems to treat anything in square brackets as a short code, resulting in the short code not being trimmed. I'm not very familiar with the short code module, but I think it will ignore anything in square brackets that's not defined as a short code. I think a long piece of text in square brackets would therefore get left in the text and not trimmed, which is probably not the intended effect.
I'm setting back to "Needs work", as I think this needs some more thought, and maybe some explicit test cases, but if I've misunderstood, please explain in a comment.