Fix admin socket metadata handling and footer HTML rendering in admin-tools

This commit is contained in:
David Rotermund
2026-09-22 02:41:42 +02:00
committed by yu-i-i
parent 24e2fdaab5
commit 345bc57e36
3 changed files with 54 additions and 8 deletions
@@ -16,9 +16,14 @@ function FooterItemLi({
label,
}: FooterItem) {
const textToDisplay = translatedText || text
const hasMarkup = /<[^>]+>/.test(textToDisplay)
if (!href) {
return <li dangerouslySetInnerHTML={{ __html: textToDisplay }} />
return hasMarkup ? (
<li dangerouslySetInnerHTML={{ __html: textToDisplay }} />
) : (
<li>{textToDisplay}</li>
)
}
const linkProps = {
@@ -29,7 +34,11 @@ function FooterItemLi({
return (
<li>
<a {...linkProps}>{textToDisplay}</a>
{hasMarkup ? (
<a {...linkProps} dangerouslySetInnerHTML={{ __html: textToDisplay }} />
) : (
<a {...linkProps}>{textToDisplay}</a>
)}
</li>
)
}