fix(ui): escape raw HTML in user prompt messages (#260)
## Summary - escape raw HTML when rendering user message markdown so prompt input is shown as text instead of injected HTML - keep assistant and tool markdown behavior unchanged by scoping the escape behavior to user messages - update markdown cache keys so escaped and non-escaped render output do not collide ## Verification - `npm run typecheck --workspace @codenomad/ui` *(fails in this workspace because frontend dependencies are not installed)* - `npm run build --workspace @codenomad/ui` *(fails in this workspace because `vite` is not installed)* -- Yours, [CodeNomadBot](https://github.com/NeuralNomadsAI/CodeNomad) Co-authored-by: Shantur <shantur@Mac.home>
This commit is contained in:
committed by
GitHub
parent
37b3f85e61
commit
d1a27ac31b
@@ -146,6 +146,7 @@ export default function MessagePart(props: MessagePartProps) {
|
||||
sessionId={props.sessionId}
|
||||
isDark={isDark()}
|
||||
size={isAssistantMessage() ? "tight" : "base"}
|
||||
escapeRawHtml={props.messageType === "user"}
|
||||
onRendered={props.onRendered}
|
||||
/>
|
||||
</Show>
|
||||
|
||||
Reference in New Issue
Block a user