Fix embedded note content escaping

This commit is contained in:
Bojan Mojsilovic 2024-02-06 13:28:58 +01:00
parent ac780f455c
commit 72cd3d9d2e

View File

@ -20,6 +20,8 @@ const EmbeddedNote: Component<{ note: PrimalNote, mentionedUsers?: Record<string
const threadContext = useThreadContext(); const threadContext = useThreadContext();
const intl = useIntl(); const intl = useIntl();
let noteContent: HTMLDivElement | undefined;
const noteId = () => nip19.noteEncode(props.note.post.id); const noteId = () => nip19.noteEncode(props.note.post.id);
const navToThread = () => { const navToThread = () => {
@ -94,12 +96,13 @@ const EmbeddedNote: Component<{ note: PrimalNote, mentionedUsers?: Record<string
</span> </span>
</span> </span>
</div> </div>
<div class={styles.noteContent}> <div class={styles.noteContent} ref={noteContent}>
<ParsedNote <ParsedNote
note={props.note} note={props.note}
ignoreMentionedNotes={true} ignoreMentionedNotes={true}
shorten={true} shorten={true}
isEmbeded={true} isEmbeded={true}
width={noteContent?.getBoundingClientRect().width}
/> />
</div> </div>
</> </>