mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Fix admin socket metadata handling and footer HTML rendering in admin-tools
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user