mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-13 17:56:59 +00:00
4c9dc2f08e
texvc had several tasks in the past: 1 checking the input 2 convert MediaWiki custom syntax to standard LaTeX 3 run LaTeX 4 convert dvi2png This change provides a simplified version that performs only steps 1+2. This is required to avoid security problems with tools like MathJax, especially if these tools are run at the server-side. Bug: 54624 Change-Id: I1650e6ec2ccefff6335fbc36bbe8ca8f59db0faa
9 lines
223 B
Perl
9 lines
223 B
Perl
#!/usr/local/bin/perl
|
|
my $texvc = `texvc '\\sin(x)+{}{}\\cos(x)^2 newcommand'`;
|
|
if (substr($result,0,1) eq "+") {
|
|
print "good";
|
|
} else {
|
|
print "bad";
|
|
}
|
|
print $result;
|
|
my $ = `tex2svg '\\sin(x)+{}{}\\cos(x)^2 newcommand'`; |