Update dependency html-entities to v2 (#9697)
* Update dependency html-entities to v2 * Update dependency html-entities to v2 * Update imports Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
eca1eb1390
commit
c8877727a5
5 changed files with 11 additions and 11 deletions
|
@ -24,7 +24,7 @@ import classNames from 'classnames';
|
|||
import EMOJIBASE_REGEX from 'emojibase-regex';
|
||||
import { split } from 'lodash';
|
||||
import katex from 'katex';
|
||||
import { AllHtmlEntities } from 'html-entities';
|
||||
import { decode } from 'html-entities';
|
||||
import { IContent } from 'matrix-js-sdk/src/models/event';
|
||||
import { Optional } from 'matrix-events-sdk';
|
||||
|
||||
|
@ -518,7 +518,7 @@ export function bodyToHtml(content: IContent, highlights: Optional<string[]>, op
|
|||
// Cheerio instance to be returned.
|
||||
phtml('div, span[data-mx-maths!=""]').replaceWith(function(i, e) {
|
||||
return katex.renderToString(
|
||||
AllHtmlEntities.decode(phtml(e).attr('data-mx-maths')),
|
||||
decode(phtml(e).attr('data-mx-maths')),
|
||||
{
|
||||
throwOnError: false,
|
||||
// @ts-ignore - `e` can be an Element, not just a Node
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue