Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aichat: Fix crash caused by HTML entities in markdown renderer #38351

Closed
nullhook opened this issue May 15, 2024 · 0 comments · Fixed by brave/brave-core#23710
Closed

aichat: Fix crash caused by HTML entities in markdown renderer #38351

nullhook opened this issue May 15, 2024 · 0 comments · Fixed by brave/brave-core#23710
Assignees
Labels
OS/Android Fixes related to Android browser functionality OS/Desktop

Comments

@nullhook
Copy link

HTML entities returned from the remote LLM cause a crash because the markdown renderer internally uses innerHTML in one of the packages. This conflicts with UntrustedWebUI, of which AIChat's WebUI is an instance.

“Uncaught TypeError: Failed to set the ‘innerHTML’ property on ‘Element’: This document requires ‘TrustedHTML’ assignment and no ‘default’ policy for ‘TrustedHTML’ has been defined.“, source: chrome-untrusted://chat/chat_ui.bundle.js

prompt: why we use & to escape in HTML?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS/Android Fixes related to Android browser functionality OS/Desktop
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants