open-webui/backend/open_webui/retrieval/loaders
Classic298 1bfa59acbd
fix: keep HTML entities in extracted document text (#29736)
Uploading a file whose text contains literal HTML entities stored a rewritten copy of it: ` ` became a non-breaking space, `>` became `>`, and ` ` was decoded twice down to a bare non-breaking space. That stored text is what gets indexed and what the model reads, so notes, specs and source files reached the model differing from the file that was uploaded.

Every loaded document goes through `ftfy.fix_text`, which is there to repair mojibake left by the encoding-detection fallback. Its default configuration also decodes HTML entities, per line and sticky forward: entities are decoded on every line up to the first line holding a literal `<`, then left alone for the rest of the document. The same escape therefore survives or vanishes depending on where it sits in the file. This disables that one behaviour and leaves every other ftfy repair in place.

Text from a third-party extraction engine that returns escaped output now keeps those escapes. Guessing whether an escape is markup or content is the bug being fixed.

Fixes #29732
2026-09-06 15:13:45 -04:00
..
datalab_marker.py refactor: remove the unreachable async half of the Mistral loader and an unused Datalab helper (#28839) 2026-08-20 13:14:14 -07:00
external_document.py feat: add {{USER_GROUPS}} and {{USER_GROUP_IDS}} placeholders for custom forwarded headers (#27236) 2026-07-26 23:21:26 -04:00
external_web.py refac 2026-07-27 19:39:36 -04:00
main.py fix: keep HTML entities in extracted document text (#29736) 2026-09-06 15:13:45 -04:00
microsoft_web_iq.py refac 2026-08-25 15:47:55 -04:00
mineru.py perf: build info log messages lazily so raising the log level actually saves work (#27837) 2026-08-02 15:39:10 -05:00
mistral.py refactor: remove the unreachable async half of the Mistral loader and an unused Datalab helper (#28839) 2026-08-20 13:14:14 -07:00
paddleocr_vl.py perf: build info log messages lazily so raising the log level actually saves work (#27837) 2026-08-02 15:39:10 -05:00
tavily.py refac 2026-08-24 17:56:11 -04:00
youtube.py fix(retrieval): report why a URL could not be read instead of blaming the knowledge base (#28362) 2026-08-10 19:18:04 -06:00