SECURITY: do not allow tags in math wrapper
This commit is contained in:
parent
28162e9ded
commit
fd5258cb3c
|
@ -52,14 +52,14 @@ function decorate(elem, isPreview) {
|
|||
`<${tag} style="display: none;"><script type="math/tex${display}"></script></${tag}>`
|
||||
);
|
||||
$math = $mathWrapper.children();
|
||||
$math.html($elem.text());
|
||||
$math.text($elem.text());
|
||||
$elem.after($mathWrapper);
|
||||
} else if ($elem.hasClass("asciimath")) {
|
||||
$mathWrapper = $(
|
||||
`<span style="display: none;"><script type="math/asciimath"></script></span>`
|
||||
);
|
||||
$math = $mathWrapper.children();
|
||||
$math.html($elem.text());
|
||||
$math.text($elem.text());
|
||||
$elem.after($mathWrapper);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue