mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-07 18:31:07 +00:00
Prevent props being added as HTML attributes (#35739)
This commit is contained in:
parent
4cabc031e6
commit
bf15b1d65d
|
@ -38,11 +38,7 @@ export const EmojiHTML = <Element extends ElementType>(
|
||||||
if (isModernEmojiEnabled()) {
|
if (isModernEmojiEnabled()) {
|
||||||
return <ModernEmojiHTML {...props} />;
|
return <ModernEmojiHTML {...props} />;
|
||||||
}
|
}
|
||||||
const Wrapper = props.as ?? 'div';
|
const { as: asElement, htmlString, extraEmojis, ...rest } = props;
|
||||||
return (
|
const Wrapper = asElement ?? 'div';
|
||||||
<Wrapper
|
return <Wrapper {...rest} dangerouslySetInnerHTML={{ __html: htmlString }} />;
|
||||||
{...props}
|
|
||||||
dangerouslySetInnerHTML={{ __html: props.htmlString }}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user