v0.3.13 renders <> characters as html escape sequences #1794

Closed
opened 2025-11-11 14:53:24 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @Nekuromento on GitHub (Aug 16, 2024).

Bug Report

Installation Method

Official docker image

Environment

  • Open WebUI Version: [v0.3.13]

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

Model output is displayed verbatim in the chat UI.

Actual Behavior:

Model output is escaped for injection into HTML but is instead displayed as text resulting in visible HTML escape sequences.

Description

Bug Summary:

If model output contains < or > it is rendered as &lt; and &gt;

There are no errors in browser console.

Reproduction Details

Steps to Reproduce:

Ask the model to print <THOUGHT>

Logs and Screenshots

Screenshots/Screen Recordings:

Screenshot 2024-08-16 at 07 37 20

Additional Information

[Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.]

Note

If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!

Originally created by @Nekuromento on GitHub (Aug 16, 2024). # Bug Report ## Installation Method Official docker image ## Environment - **Open WebUI Version:** [v0.3.13] **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: Model output is displayed verbatim in the chat UI. ## Actual Behavior: Model output is escaped for injection into HTML but is instead displayed as text resulting in visible HTML escape sequences. ## Description **Bug Summary:** If model output contains `<` or `>` it is rendered as `&lt;` and `&gt;` There are no errors in browser console. ## Reproduction Details **Steps to Reproduce:** Ask the model to print \<THOUGHT\> ## Logs and Screenshots **Screenshots/Screen Recordings:** <img width="525" alt="Screenshot 2024-08-16 at 07 37 20" src="https://github.com/user-attachments/assets/91efa83b-cd0f-4bfb-bab4-f49774fc965e"> ## Additional Information [Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.] ## Note If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
Author
Owner

@tjbck commented on GitHub (Aug 16, 2024):

Fixed on dev.

@tjbck commented on GitHub (Aug 16, 2024): Fixed on dev.
Author
Owner

@Nekuromento commented on GitHub (Aug 16, 2024):

I just checked dev docker image and unless the changes have to yet landed on nightly build its not fixed and its arguably worse.

In 0.3.12 pseudo-xml tags output from model is rendering just fine:

v0.3.12

In 0.3.13 tags were displayed w/ HTML escape sequences:

v0.3.13

In dev tags are not displayed at all because they are treated as actual HTML tags:

dev

I think 0.3.12 had correct bahaviour and now its broken even more.

@Nekuromento commented on GitHub (Aug 16, 2024): I just checked `dev` docker image and unless the changes have to yet landed on nightly build its not fixed and its arguably worse. In `0.3.12` pseudo-xml tags output from model is rendering just fine: <img width="686" alt="v0.3.12" src="https://github.com/user-attachments/assets/98e27c05-91f4-457d-a739-44f9eba88539"> In `0.3.13` tags were displayed w/ HTML escape sequences: <img width="686" alt="v0.3.13" src="https://github.com/user-attachments/assets/f05303d9-6509-4d49-8687-038cba686f4f"> In `dev` tags are not displayed at all because they are treated as actual HTML tags: <img width="686" alt="dev" src="https://github.com/user-attachments/assets/bfb7db7e-8b95-4cc0-a8a8-c1147a2565d9"> I think `0.3.12` had correct bahaviour and now its broken even more.
Author
Owner

@tjbck commented on GitHub (Aug 16, 2024):

Pushed a fix on dev, let me know if the issue persists

@tjbck commented on GitHub (Aug 16, 2024): Pushed a fix on dev, let me know if the issue persists
Author
Owner

@Nekuromento commented on GitHub (Aug 16, 2024):

Thank you. I can confirm that pseudo-xml tags now render correctly but it seems there's now an issue with markdown code block and mermaid diagram detection.

v0.3.12 renders everything correctly:

v0 3 12

dev displays raw markdown instead of rendering it:

dev
@Nekuromento commented on GitHub (Aug 16, 2024): Thank you. I can confirm that pseudo-xml tags now render correctly but it seems there's now an issue with markdown code block and mermaid diagram detection. v0.3.12 renders everything correctly: <img width="686" alt="v0 3 12" src="https://github.com/user-attachments/assets/0218bda4-329b-4200-b870-1a60264de760"> dev displays raw markdown instead of rendering it: <img width="686" alt="dev" src="https://github.com/user-attachments/assets/fe2f29e2-8686-46ad-ab37-b44311dbc24f">
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#1794