mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-30 17:05:16 -05:00
fix: exporting a table to CSV keeps markdown in the header row (#35299)
When a table header had formatting such as **bold**, `code` or a link, Export to CSV wrote it raw, so the header came out as "**Name**" or "[Docs](https://example.com)" while the rows below were clean. The header now takes its text the same way the rows do. Fixes #35298
This commit is contained in:
1 parent
571e4e3b52
commit
294c0e988d
1 file changed
+2
-1
@@ -170,7 +170,8 @@
|
||||
const exportTableToCSVHandler = (token, tokenIdx = 0) => {
|
||||
// Extract header row text, decode HTML entities, and escape for CSV.
|
||||
const header = token.header.map(
|
||||
(headerCell) => `"${decode(headerCell.text).replace(/"/g, '""')}"`
|
||||
(headerCell) =>
|
||||
`"${decode(headerCell.tokens.map((token) => token.text).join('')).replace(/"/g, '""')}"`
|
||||
);
|
||||
|
||||
// Create an array for rows that will hold the mapped cell text.
|
||||
|
||||
Reference in new issue
Block a user