fix: don't decode HTML entities (&foo;
) until rendering (#465)
This commit is contained in:
parent
9a7c37db24
commit
f8ebc0e99a
4 changed files with 18 additions and 5 deletions
|
@ -52,6 +52,12 @@ describe('html-parse', () => {
|
|||
expect(formatted).toMatchSnapshot('html')
|
||||
expect(serializedText).toMatchSnapshot('text')
|
||||
})
|
||||
|
||||
it('html entities', async () => {
|
||||
const { formatted, serializedText } = await render('<p>Hello <World />.</p>')
|
||||
expect(formatted).toMatchSnapshot('html')
|
||||
expect(serializedText).toMatchSnapshot('text')
|
||||
})
|
||||
})
|
||||
|
||||
async function render(input: string, emojis?: Record<string, Emoji>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue