mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[GH-ISSUE #9807] HTML tags (e.g., <div>) not rendering correctly in Open WebUI #54320
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @liuboyangaa on GitHub (Feb 11, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/9807
Bug Report
Description: Hello, I'm encountering an issue where HTML tags (such as
I am using Open WebUI to output dynamic HTML content, but it seems that HTML tags are not being processed as expected. For example, when using yield to send HTML with a
Steps to Reproduce:
Use the Open WebUI backend to generate and send dynamic HTML content via yield.
Include HTML tags like
Observe the response on the front-end, where these tags appear as raw text (e.g.,
Code:
async def pipe(self):
# Example of sending HTML content
yield f"""
Click for searching result
{self.search_result}
"""
Expected Behavior:
HTML tags should be rendered correctly on the front-end, and any valid HTML content should be displayed as intended. For example:
@tjbck commented on GitHub (Feb 11, 2025):
Intended behaviour. Rendering html directly will enable XSS attack vector.