mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #17838] Bug: <details type="code_interpreter"> tag breaks XML code blocks #57078
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 @DSP-AID on GitHub (Sep 28, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17838
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.6.31
Ollama Version (if applicable)
Not applicable — using LM Studio v 03.27 instead of Ollama
Operating System
Ubuntu Server 24.04 (Docker container)
Browser (if applicable)
Firefox 118.0, Chrome 117.0, Edge
Confirmation
README.md.Expected Behavior
The XML code block should render cleanly with proper syntax highlighting and no injected HTML tags. Specifically, the
<details type="code_interpreter">and<summary>elements should not appear unless explicitly requested by the user or model. The entire code block should remain intact, without any DOM-breaking elements or misplaced closing tags. Rendering should be consistent with other code types likepythonorjson, where no visual or structural issues occur.Actual Behavior
When the model generates a response with a code block marked as
xml, Open WebUI automatically injects the following HTML tags into the block:@tjbck commented on GitHub (Sep 28, 2025):
Model dependent behaviour, if you use a higher end models like gpt-4.1, you're less likely to encounter this issue.