Skip to content

Conversation

rparke
Copy link
Contributor

@rparke rparke commented May 16, 2025

No description provided.

rparke and others added 10 commits May 16, 2025 11:39
…placeholders to use this property

To prepare for extending the placeholder syntax to include unsafe placeholders, we are introducing a type property to manage and be the single source of truth about what type of placeholder is being used to make extensions to the syntax easier to maintain and write.

We are assuming that a placeholder can only ever be of one type, and that union types are forbidden (e.g. unsafe and conditional placeholders are not allowed)
adds unsafe placeholder type for placeholders with the pattern  `((<value>::unsafe))` as well as a stub replacement rule to check that unsafe placeholders are parsed correctly. This is to ensure we are ready for the next ticket, adding specific logic to implement the sanitisation of markdown.
…ighting appears correct

we were incorrectly using the placeholder styling before. This styling was designed to ignore trailing parentheses when highlighting the placeholder's variable name. This new css class ensures the highlighting works correcly for unsafe placeholders where the variable doesn't have trailing parentheses
Any of the following characters: `*_(){}[]<>#+-.!| are escaped with a / to ensure they aren't rendered by the markdown engine to links, headings etc
… is found in a replacement value

For the first iteration the simplest way to sanitise values containing a link is to consider the entire link compromised and redact everything in the value.

This will require user testing as it may be more agressive sanitisation than users expect
…imit-cache-key"

This reverts commit 7dfafcb, reversing
changes made to a97b36f.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant