mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 23:21:44 -05:00
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/20745
Author: @YuriNachos
Created: 1/17/2026
Status: ❌ Closed
Base:
main← Head:fix-tool-call-html-entities-decoding📝 Commits (5)
f84aad5fix: handle None value for model capabilities in builtin_tools check0d4898ffix: handle None value for model capabilities in file_context check9772be0fix: handle None value for capabilities in get_model_capability helper3d404fffix: URL-encode OAuth client secrets to handle special characters3079444fix: Decode HTML entities in tool call results before sending to LLM📊 Changes
4 files changed (+13 additions, -14 deletions)
View changed files
📝
backend/open_webui/config.py(+6 -6)📝
backend/open_webui/utils/middleware.py(+4 -6)📝
backend/open_webui/utils/tools.py(+1 -1)📝
src/lib/utils/index.ts(+2 -1)📄 Description
Summary
Fixes #20600
When tool call results contain HTML entities like
",&,',they are not decoded before being sent to the LLM in subsequent conversation turns.
Root Cause
processDetails()in src/lib/utils/index.ts inserts the escaped content directly without decodingExample: A tool result containing
"{"results": ...}is sent to the LLM as-is instead of being decoded to"{"results": ...}Changes
src/lib/utils/index.tsprocessDetails()function (line 875-876), appliedunescapeHtml()to tool call results before inserting them into messagesunescapeHtml()function already existed in the file and uses DOMParser to decode HTML entitiesTest
The fix ensures HTML entities are properly decoded:
"→"&→&'→''→'Tool call results in multi-turn conversations now contain clean JSON instead of HTML-escaped content.
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.