Your one-stop-cake-shop for everything Freshly Baked has to offer

fix(m): reduce allowed template string patterns

We previously expanded templating to catch a lot more things.
Unfortunately, it meant that scripts with any codeblocks inside would
blow up. We only really need to template the lowercase alphabet and a
separator character (I've chosen an underscore)

This makes it far less likely that legitimate text will be removed

+1 -1
+1 -1
menu/src/main.rs
··· 41 41 html: String, 42 42 replacements: HashMap<&str, Box<dyn 'a + Send + Fn() -> Option<AnyString<'a>>>>, 43 43 ) -> String { 44 - let re = regex_static::static_regex!(r"\{([^\}:]+)(?::([^\}]+))?\}"); 44 + let re = regex_static::static_regex!(r"\{([a-z_]+)(?::([a-z_]+))?\}"); 45 45 re.replace_all(&html, |captures: &Captures| { 46 46 let replacement_name = &captures[1]; 47 47 let replacement = replacements