mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-15 21:19:39 -05:00
[PR #20755] [MERGED] fix: decode HTML entities in tool call results for multi-turn conversations #96805
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/20755
Author: @Classic298
Created: 1/17/2026
Status: ✅ Merged
Merged: 2/12/2026
Merged by: @tjbck
Base:
dev← Head:fix-unescaped📝 Commits (1)
fc90912fix: decode HTML entities in tool call results for multi-turn conversations📊 Changes
1 file changed (+8 additions, -8 deletions)
View changed files
📝
src/lib/utils/index.ts(+8 -8)📄 Description
Problem
In multi-turn conversations involving tool calls, messages retrieved from the database contain HTML-escaped JSON (e.g.,
",&,'). The processDetails function in the frontend inserted this HTML-escaped content directly into messages, causing the LLM to receive malformed, hard-to-parse content.This degraded model performance in tool-heavy chats, as subsequent turns would contain escaped entities.
Solution
Use the existing unescapeHtml utility function to decode HTML entities in tool call results before inserting them into the message content.
Changes
Testing
Fixes #20600
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.