use strict;
use Digest::MD5 qw(md5_hex);
use File::Temp qw(tempdir);
-use URI::Escape qw(uri_escape);
+use HTML::Entities;
use IkiWiki 2.00;
sub import { #{{{
my $digest = md5_hex($code, $height);
- my $teximgdir = "/teximag";
+ my $teximgdir = "/teximg";
my $imglink = "$teximgdir/$digest.png";
my $imglog = "$teximgdir/$digest.log";
will_render($params->{destpage}, $imglink);
if (-e "$config{destdir}/$imglink" ||
gen_image($code, $height, $digest, $teximgdir)) {
return qq{<img src="$imgurl" alt="}
- .(exists $params{alt} ? $params{alt} : uri_escape($code))
+ .(exists $params->{alt} ? $params->{alt} : encode_entities($code))
.qq{" class="teximg" />};
}
else {