feat/bug: escape HTML rendering #117

Closed
opened 2025-11-11 14:06:41 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @oliverbob on GitHub (Dec 23, 2023).

Bug Report

Description

Bug Summary:
Example code being asked to Phi model:

The meta tag is being escaped by the renderer:

<meta name="og:image" content="https://askai.city/OSS.png">
<meta name="og:description" content="Chat with the world's great AI Models. Explore the latest developments in artificial intelligence and learn about cutting-edge technologies that are transforming our world.">

Screenshot from 2023-12-23 19-09-01

Steps to Reproduce:
[Outline the steps to reproduce the bug. Be as detailed as possible.]

Expected Behavior:
[Describe what you expected to happen.]

Actual Behavior:
The developer console however showed the meta tags:
Screenshot from 2023-12-23 19-22-52

Environment

  • Operating System: Ubuntu 22.04
  • **Browser: Version 120.0.6099.129 (Official Build) (64-bit)

Thanks

Originally created by @oliverbob on GitHub (Dec 23, 2023). # Bug Report ## Description **Bug Summary:** Example code being asked to Phi model: The meta tag is being escaped by the renderer: ``` <meta name="og:image" content="https://askai.city/OSS.png"> <meta name="og:description" content="Chat with the world's great AI Models. Explore the latest developments in artificial intelligence and learn about cutting-edge technologies that are transforming our world."> ``` ![Screenshot from 2023-12-23 19-09-01](https://github.com/ollama-webui/ollama-webui/assets/23272429/f7ea6849-236a-41c6-a4bb-afe2a45ad255) **Steps to Reproduce:** [Outline the steps to reproduce the bug. Be as detailed as possible.] **Expected Behavior:** [Describe what you expected to happen.] **Actual Behavior:** The developer console however showed the meta tags: ![Screenshot from 2023-12-23 19-22-52](https://github.com/ollama-webui/ollama-webui/assets/23272429/92012031-d1df-4b68-b6c6-fb8a34e2d662) ## Environment - **Operating System:** Ubuntu 22.04 - **Browser: Version 120.0.6099.129 (Official Build) (64-bit) Thanks
GiteaMirror added the good first issuehelp wanted labels 2025-11-11 14:06:41 -06:00
Author
Owner

@anuraagdjain commented on GitHub (Dec 23, 2023):

I was able to replicate this and fix it locally. I can open a PR soon.

Screenshot 2023-12-23 at 2 32 35 PM

Update: Regenerating the message also worked fine for HTML.

@anuraagdjain commented on GitHub (Dec 23, 2023): I was able to replicate this and fix it locally. I can open a PR soon. <img width="782" alt="Screenshot 2023-12-23 at 2 32 35 PM" src="https://github.com/ollama-webui/ollama-webui/assets/4705103/267e106b-6713-4b19-943c-879a78fc3536"> Update: Regenerating the message also worked fine for HTML.
Author
Owner

@oliverbob commented on GitHub (Dec 23, 2023):

Thanks for responding promptly @anuraagdjain. Can't wait to see this merged.

@oliverbob commented on GitHub (Dec 23, 2023): Thanks for responding promptly @anuraagdjain. Can't wait to see this merged.
Author
Owner

@tjbck commented on GitHub (Dec 24, 2023):

Btw, I'm also actively taking a look at how we might rectify this issue, not sure If there are any simple solutions.

@tjbck commented on GitHub (Dec 24, 2023): Btw, I'm also actively taking a look at how we might rectify this issue, not sure If there are any simple solutions.
Author
Owner

@anuraagdjain commented on GitHub (Dec 24, 2023):

Do you've steps to replicate ? I'm wondering if the highlightjs before:highlight plugin (docs) could help us.

@anuraagdjain commented on GitHub (Dec 24, 2023): Do you've steps to replicate ? I'm wondering if the highlightjs before:highlight plugin ([docs](https://highlightjs.readthedocs.io/en/latest/plugin-api.html#before-highlight)) could help us.
Author
Owner

@tjbck commented on GitHub (Dec 26, 2023):

@anuraagdjain Here's how to reproduce: using openhermes2-mistral:latest model, prompt: Write a meta tag.

If it renders the html code correctly in a code block, you can always regenerate. Thanks!

@tjbck commented on GitHub (Dec 26, 2023): @anuraagdjain Here's how to reproduce: using openhermes2-mistral:latest model, prompt: Write a meta tag. If it renders the html code correctly in a code block, you can always regenerate. Thanks!
Author
Owner

@oliverbob commented on GitHub (Dec 26, 2023):

I guess just focus on RBAC for now. That's more pressing than this minor issue.

@oliverbob commented on GitHub (Dec 26, 2023): I guess just focus on RBAC for now. That's more pressing than this minor issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#117