diff --git a/public/docs/release-notes.md b/public/docs/release-notes.md index 82b9b96c..3fa12931 100644 --- a/public/docs/release-notes.md +++ b/public/docs/release-notes.md @@ -14,6 +14,7 @@ - Ignore the healthcheck endpoint in the "too busy" limiter - Send the referrer origin for YouTube embeddings due to their requirement - Force kill the server after a timeout when waiting for the realtime server to close connections on shutdown +- Fix regexes for `[time=...]`, `[name=...]` and `[color=...]` shortcodes in lists ## 1.10.3 2025-04-09 diff --git a/public/js/extra.js b/public/js/extra.js index f6be7b6b..c2a4c367 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -233,10 +233,10 @@ window.viewAjaxCallback = null // regex for extra tags const spaceregex = /\s*/ const notinhtmltagregex = /(?![^<]*>|[^<>]*<\/)/ -let coloregex = /\[color=([#|(|)|\s|,|\w]*?)\]/ +let coloregex = /\[color=([#()\s,\w]*?)]/ coloregex = new RegExp(coloregex.source + notinhtmltagregex.source, 'g') -let nameregex = /\[name=(.*?)\]/ -let timeregex = /\[time=([:|,|+|-|(|)|\s|\w]*?)\]/ +let nameregex = /\[name=(.*?)]/ +let timeregex = /\[time=([:,.+()\s\w-]*?)]/ const nameandtimeregex = new RegExp(nameregex.source + spaceregex.source + timeregex.source + notinhtmltagregex.source, 'g') nameregex = new RegExp(nameregex.source + notinhtmltagregex.source, 'g') timeregex = new RegExp(timeregex.source + notinhtmltagregex.source, 'g')