Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 359f5e0

Browse files
committed
Unbreak in-app permalink tooltips
Fixes: element-hq/element-web#22874 Signed-off-by: Johannes Marbach <[email protected]>
1 parent 81653cf commit 359f5e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/tooltipify.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ export function tooltipifyLinks(rootNodes: ArrayLike<Element>, ignoredNodes: Ele
5353
const href = node.getAttribute("href");
5454

5555
const tooltip = <LinkWithTooltip tooltip={new URL(href, window.location.href).toString()}>
56-
<span dangerouslySetInnerHTML={{ __html: node.outerHTML }} />
56+
{node.innerHTML}
5757
</LinkWithTooltip>;
5858

5959
ReactDOM.render(tooltip, container);
60-
node.parentNode.replaceChild(container, node);
60+
node.replaceChildren(container)
6161
containers.push(container);
6262
tooltipified = true;
6363
}

0 commit comments

Comments
 (0)