diff --git a/ts/editable/mathjax.ts b/ts/editable/mathjax.ts index 1c340d138..bbc4b8006 100644 --- a/ts/editable/mathjax.ts +++ b/ts/editable/mathjax.ts @@ -70,7 +70,7 @@ export function convertMathjax( * Escape characters which are technically legal in Mathjax, but confuse HTML. */ export function escapeSomeEntities(value: string): string { - return value.replace(//g, ">").replace(/&/g, "&"); + return value.replace(/&/g, "&").replace(//g, ">"); } export function unescapeSomeEntities(value: string): string {