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

fix(m): reduce allowed template string patterns #177

merged opened by a.starrysky.fyi targeting main from private/minion/push-smklqylmuplo

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

Labels

None yet.

requested-reviewers

None yet.

tested-working

None yet.

rejected

None yet.

assignee

None yet.

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

History

4 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
fix(m): reduce allowed template string patterns
5/5 success
expand
expand 0 comments
pull request successfully merged
1 commit
expand
fix(m): reduce allowed template string patterns
5/5 success
expand
expand 0 comments
1 commit
expand
fix(m): reduce allowed template string patterns
5/5 success
expand
expand 0 comments
1 commit
expand
fix(m): reduce allowed template string patterns
5/5 success
expand
expand 0 comments