feat: Allow multi-line values in table cells #4372

Closed
opened 2025-11-11 15:52:34 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @ciejer on GitHub (Mar 11, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

When rendering a markdown table, OpenWebUI does not render linebreaks such as <br> and /n within a table cell.
My users come from ChatGPT, which produces table markdown separated by <br> and can render this in the interface without issue; and allows copying the formatted response out into other tools easily.

The most common use case is bulleted lists within a table cell; ie a list of tasks with a "risks" column.

I don't mind what syntax we use to render newlines within a table; as we can instruct the model to use whatever syntax is supported; however <br> seems to be most common in the absence of a markdown standard.

The closest issue to this I can find is #1663.

See example below:
Image

Desired Solution you'd like

Render <br> or \n as linebreaks within a table cell, allowing multiline tables to be produced and copied out as rich text.

Alternatives Considered

No response

Additional Context

No response

Originally created by @ciejer on GitHub (Mar 11, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description When rendering a markdown table, OpenWebUI does not render linebreaks such as `<br>` and `/n` within a table cell. My users come from ChatGPT, which produces table markdown separated by `<br>` and can render this in the interface without issue; and allows copying the formatted response out into other tools easily. The most common use case is bulleted lists within a table cell; ie a list of tasks with a "risks" column. I don't mind what syntax we use to render newlines within a table; as we can instruct the model to use whatever syntax is supported; however `<br>` seems to be most common in the absence of a markdown standard. The closest issue to this I can find is #1663. See example below: ![Image](https://github.com/user-attachments/assets/b0d990d2-2c3a-4888-8c2f-61012aa78e12) ### Desired Solution you'd like Render `<br>` or `\n` as linebreaks within a table cell, allowing multiline tables to be produced and copied out as rich text. ### Alternatives Considered _No response_ ### Additional Context _No response_
Author
Owner

@tjbck commented on GitHub (Mar 11, 2025):

HTML will not be rendered directly to prevent XSS.

@tjbck commented on GitHub (Mar 11, 2025): HTML will not be rendered directly to prevent XSS.
Author
Owner

@ciejer commented on GitHub (Mar 11, 2025):

Does that constraint include the \n option?

I'm happy to invest time in a PR.

@ciejer commented on GitHub (Mar 11, 2025): Does that constraint include the \n option? I'm happy to invest time in a PR.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#4372