feat: sanitize user messages (#42)

This commit is contained in:
Sam Denty
2024-08-22 14:06:51 +01:00
committed by GitHub
parent 8f74cc61ec
commit d364a6f774
9 changed files with 163 additions and 16 deletions

View File

@@ -272,7 +272,7 @@ export class StreamingMessageParser {
const createArtifactElement: ElementFactory = (props) => {
const elementProps = [
'class="__boltArtifact__"',
Object.entries(props).map(([key, value]) => {
...Object.entries(props).map(([key, value]) => {
return `data-${camelToDashCase(key)}=${JSON.stringify(value)}`;
}),
];