Tags: patch

Hi,

Alexander Zangerl wrote:
> On Tue, 18 Jul 2006 12:13:01 +0200, Moritz Lenz writes:
>> If that's to much work, please contact me, I could provide a patch.
> 
> please do! as igal is pretty much dead upstream, i'm not too keen 
> on doing all the cleanup work myself - but patches are always appreciated.

A patch sanitizing some of igal's html output is attached. Note that for
now I didn't sanitize any of the template files, perhaps a patch will
follow...

I didn't test it thouroughly, but the changes are trivial and only occur
within string constants so I don't see what I could have done wrong...

Best regards,
Moritz

-- 
Moritz Lenz
http://moritz.faui2k3.org/
--- a/igal      2006-07-19 07:32:21.000000000 +0200
+++ b/igal      2006-07-19 07:32:27.000000000 +0200
@@ -640,16 +640,17 @@
        }
 
 # Now output the row of thumbnails.
-       print IXW "<TABLE border=0 cellspacing=0 cellpadding=$opt_p>\n";
-       print IXW "  <TR><TD class=\"tiled\" height=$opt_t colspan=", 
($opt_r?$num:$num+2), ">&nbsp;</TD></TR>\n" unless ($opt_r);
-       print IXW "  <TR>";
-       print IXW "\n    <TD class=\"thumb\">&nbsp;</TD>\n" unless ($opt_r);
+       print IXW '<table border="0" cellspacing="0" summary="" '.
+               "cellpadding=\"$opt_p\">\n";
+       print IXW "  <tr><td class=\"tiled\" height=$opt_t colspan=", 
($opt_r?$num:$num+2), ">&nbsp;</td></tr>\n" unless ($opt_r);
+       print IXW "  <tr>";
+       print IXW "\n    <td class=\"thumb\">&nbsp;</td>\n" unless ($opt_r);
        for ($j = 0; $j < $num; $j++) {
-               print IXW "    <TD class=\"thumb\">\n      ";
+               print IXW "    <td class=\"thumb\">\n      ";
                if ($opt_s) {
-                       print IXW "<A href=\"", $safenames[$i+$j], "\">";
+                       print IXW "<a href=\"", $safenames[$i+$j], "\">";
                } else {
-                       print IXW "<A href=\"", $slides[$i+$j], "\">"; 
+                       print IXW "<a href=\"", $slides[$i+$j], "\">"; 
                }
                print ".";
                if ($opt_k) {    # use image caption for the alt attribute
@@ -663,40 +664,40 @@
                $altname=~s/"/&\#34;/g;  # " make this attribute-safe
                $thumb = $thumbprefix . $safenames[$i+$j];
                if ($HAVEIM) {
-                       print IXW "<IMG src=\"$thumb\" width=$thumbx[$i+$j] 
height=$thumby[$i+$j] alt=\"$altname\" title=\"$altname\" border=0>";
+                       print IXW "<img src=\"$thumb\" width=$thumbx[$i+$j] 
height=\"$thumby[$i+$j]\" alt=\"$altname\" title=\"$altname\" border=\"0\" />";
                } else {
-                       print IXW "<IMG src=\"$thumb\" alt=\"$altname\" 
title=\"$altname\" border=0>";
+                       print IXW "<img src=\"$thumb\" alt=\"$altname\" 
title=\"$altname\" border=\"0\" />";
                }
-               print IXW "</A></TD>\n";
+               print IXW "</a></td>\n";
        }
-       print IXW "    <TD class=\"thumb\">&nbsp;</TD>" unless ($opt_r);
-       print IXW "\n  </TR>\n";
-       print IXW "  <TR><TD class=\"tiled\" height=$opt_t colspan=", $num+2, 
">&nbsp;</TD></TR>\n" unless ($opt_r);
+       print IXW "    <td class=\"thumb\">&nbsp;</td>" unless ($opt_r);
+       print IXW "\n  </tr>\n";
+       print IXW "  <tr><td class=\"tiled\" height=$opt_t colspan=", $num+2, 
">&nbsp;</td></tr>\n" unless ($opt_r);
        if (($opt_a or $opt_ad or $opt_as) and $HAVEIM) {
-               print IXW "  <TR>\n";
-               print IXW "<TD>&nbsp;</TD>\n" unless ($opt_r);
+               print IXW "  <tr>\n";
+               print IXW "<td>&nbsp;</td>\n" unless ($opt_r);
                for ($j = 0; $j < $num; $j++) {
-                       print IXW "    <TD width=\"".$thumbx[$i+$j]."\">";
+                       print IXW "    <td width=\"".$thumbx[$i+$j]."\">";
                        $printdim = "$isiz[$i+$j]" if $opt_as;
                        $printdim = "$xdim[$i+$j]x$ydim[$i+$j]" if $opt_ad;
                        $printdim = "$xdim[$i+$j]x$ydim[$i+$j] ($isiz[$i+$j])" 
if $opt_a;
                        print IXW $printdim;
-                       print IXW "</TD>\n";
+                       print IXW "</td>\n";
                }
-               print IXW "  </TR>\n";
+               print IXW "  </tr>\n";
        }
 #      write image captions under images if option -u is given
        if ($opt_u || $opt_U) {
-               print IXW "  <TR>\n";
-               print IXW "<TD>&nbsp;</TD>\n" unless ($opt_r);
+               print IXW "  <tr>\n";
+               print IXW "<td>&nbsp;</td>\n" unless ($opt_r);
                for ($j = 0; $j < $num; $j++) {
-                       print IXW "    <TD>" .
+                       print IXW "    <td>" .
                                ( $opt_U ? $imgnames[$i+$j] : $captions[$i+$j] )
-                               . "</TD>\n";
+                               . "</td>\n";
                }
-               print IXW "  </TR>\n";
+               print IXW "  </tr>\n";
        }
-       print IXW "</TABLE>\n<BR>\n";
+       print IXW "</table>\n<br />\n";
 }
 while (!(<IXR> =~ m/\*{10}/)) {};
 while (defined($line = <IXR>)) {

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to