diff --git a/src/interface/web/app/components/chatMessage/chatMessage.tsx b/src/interface/web/app/components/chatMessage/chatMessage.tsx index a725bdaa..77eaf64a 100644 --- a/src/interface/web/app/components/chatMessage/chatMessage.tsx +++ b/src/interface/web/app/components/chatMessage/chatMessage.tsx @@ -343,10 +343,13 @@ const ChatMessage = forwardRef((props, ref) => if (props.chatMessage.images && props.chatMessage.images.length > 0) { const imagesInMd = props.chatMessage.images - .map( - (image, index) => - `
uploaded image ${index + 1}
`, - ) + .map((image, index) => { + const decodedImage = image.startsWith("data%3Aimage") + ? decodeURIComponent(image) + : image; + const sanitizedImage = DOMPurify.sanitize(decodedImage); + return `
uploaded image ${index + 1}
`; + }) .join(""); message = `
${imagesInMd}
${message}`; } diff --git a/src/interface/web/app/page.tsx b/src/interface/web/app/page.tsx index 4bc97bf1..432787e0 100644 --- a/src/interface/web/app/page.tsx +++ b/src/interface/web/app/page.tsx @@ -225,7 +225,7 @@ function ChatBodyData(props: ChatBodyDataProps) { )} -
+
{!props.isMobileWidth && (