mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
Fix &
showing up in MathJax
https://forums.ankiweb.net/t/anki-2-1-52-release-candidate/19412/22 Accidentally introduced in #1818
This commit is contained in:
parent
fdbe211539
commit
bc6ede7c11
1 changed files with 2 additions and 2 deletions
|
@ -70,9 +70,9 @@ export function convertMathjax(
|
||||||
* Escape characters which are technically legal in Mathjax, but confuse HTML.
|
* Escape characters which are technically legal in Mathjax, but confuse HTML.
|
||||||
*/
|
*/
|
||||||
export function escapeSomeEntities(value: string): string {
|
export function escapeSomeEntities(value: string): string {
|
||||||
return value.replace(/</g, "<").replace(/>/g, ">");
|
return value.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
||||||
}
|
}
|
||||||
|
|
||||||
export function unescapeSomeEntities(value: string): string {
|
export function unescapeSomeEntities(value: string): string {
|
||||||
return value.replace(/</g, "<").replace(/>/g, ">");
|
return value.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue