fix encoding html entities in alt tag
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Thu, 23 Aug 2007 21:22:44 +0000 (21:22 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Thu, 23 Aug 2007 21:22:44 +0000 (21:22 +0000)
IkiWiki/Plugin/teximg.pm

index 1993249eb3866847d8ddc21c0e567fceeb75f44c..2eb13c86c3c3c024fc1f4903043e708d76d49a15 100644 (file)
@@ -7,7 +7,7 @@ use warnings;
 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 { #{{{
@@ -90,7 +90,7 @@ sub create ($$$) { #{{{
        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 {