FIX: correctly defines data-attributes used by local-dates (#14418)

FIX: correctly defines data-attributes used by local-dates (#14418)

This was previously relying on data-* being allowed by other initialisers which could cause bugs if local dates ends up being used in other contexts.

diff --git a/plugins/discourse-local-dates/assets/javascripts/lib/discourse-markdown/discourse-local-dates.js.es6 b/plugins/discourse-local-dates/assets/javascripts/lib/discourse-markdown/discourse-local-dates.js.es6
index 7dee925..f0de3dc 100644
--- a/plugins/discourse-local-dates/assets/javascripts/lib/discourse-markdown/discourse-local-dates.js.es6
+++ b/plugins/discourse-local-dates/assets/javascripts/lib/discourse-markdown/discourse-local-dates.js.es6
@@ -140,7 +140,20 @@ function closeBuffer(buffer, state, text) {
 }
 
 export function setup(helper) {
-  helper.allowList(["span.discourse-local-date", "span[aria-label]"]);
+  helper.allowList([
+    "span.discourse-local-date",
+    "span[aria-label]",
+    "span[data-date]",
+    "span[data-time]",
+    "span[data-format]",
+    "span[data-countdown]",
+    "span[data-calendar]",
+    "span[data-displayed-timezone]",
+    "span[data-timezone]",
+    "span[data-timezones]",
+    "span[data-recurring]",
+    "span[data-email-preview]",
+  ]);
 
   helper.registerOptions((opts, siteSettings) => {
     opts.datesEmailFormat = siteSettings.discourse_local_dates_email_format;

GitHub sha: e28a2735bc94f19ba054e3f308956e67d4555b0e

This commit appears in #14418 which was approved by markvanlan. It was merged by jjaffeux.