mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-29 06:32:52 +00:00
fix: tooltips show names and descriptions exactly as written (#32953)
Text shown in a tooltip was treated as markup, so a name, path or description containing angle brackets came out mangled or partly missing. Tooltips now show their text as written, and the few places that deliberately show formatted content ask for it explicitly.
This commit is contained in:
parent
b1e10f5306
commit
3299a09753
8 changed files with 8 additions and 1 deletions
|
|
@ -1084,6 +1084,7 @@
|
|||
? `${model?.ollama?.digest} **(${model?.ollama?.modified_at})**`
|
||||
: model.id
|
||||
)}
|
||||
allowHTML={true}
|
||||
className="min-w-0 flex-1"
|
||||
placement="top-start"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@
|
|||
sanitizeResponseContent(selectedModelDescription).replaceAll('\n', '<br>')
|
||||
)
|
||||
)}
|
||||
allowHTML={true}
|
||||
placement="right"
|
||||
>
|
||||
<img
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@
|
|||
{#each filteredItems as skill, skillIdx}
|
||||
<Tooltip
|
||||
content={getTooltipContent(skill)}
|
||||
allowHTML={true}
|
||||
placement="top-start"
|
||||
tippyOptions={{ maxWidth: '20rem' }}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -522,6 +522,7 @@
|
|||
{@const itemIdx = commandItems.length + filteredPrompts.length + skillIdx}
|
||||
<Tooltip
|
||||
content={getSkillTooltipContent(skill)}
|
||||
allowHTML={true}
|
||||
placement="top-start"
|
||||
tippyOptions={{ maxWidth: '20rem' }}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -1200,6 +1200,7 @@
|
|||
<span id="usage-{message.id}" hidden>{usage}</span>
|
||||
<Tooltip
|
||||
content={`<pre>${sanitizeResponseContent(usage)}</pre>`}
|
||||
allowHTML={true}
|
||||
placement="bottom"
|
||||
>
|
||||
<button
|
||||
|
|
|
|||
|
|
@ -263,6 +263,7 @@
|
|||
content={`${marked.parse(
|
||||
sanitizeResponseContent(localizedDescription).replaceAll('\n', '<br>')
|
||||
)}`}
|
||||
allowHTML={true}
|
||||
>
|
||||
<div class=" translate-y-[1px]">
|
||||
<svg
|
||||
|
|
|
|||
|
|
@ -214,6 +214,7 @@
|
|||
sanitizeResponseContent(selectedModelDescription).replaceAll('\n', '<br>')
|
||||
)
|
||||
)}
|
||||
allowHTML={true}
|
||||
placement="top"
|
||||
>
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
export let touch = true;
|
||||
export let theme = '';
|
||||
export let offset: TippyProps['offset'] = [0, 4];
|
||||
export let allowHTML = true;
|
||||
export let allowHTML = false;
|
||||
export let tippyOptions: Partial<TippyProps> = {};
|
||||
export let interactive = false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue