Parcourir la source

Fix double class whith hicell/hicell2 set to ""

Torbjorn Svensson il y a 20 ans
Parent
commit
e7095ddbdb
2 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 2 0
      docs/Changelog
  2. 3 0
      modules/Pisg/HTMLGenerator.pm

+ 2 - 0
docs/Changelog

@@ -8,6 +8,8 @@ pisg (0.69) - ??
    Torbjörn:
    * Bug fixes:
      + Fix urlencode to encode '&' (thanks to Thomas Whaples).
+     + Fix double class if hicell/hicell2 is set to "" (thanks RaZ for
+       spotting this).
    Language Updates:
      + Portuguese: completed by DarkForce72.
 

+ 3 - 0
modules/Pisg/HTMLGenerator.pm

@@ -684,6 +684,9 @@ sub generate_colors
     my $self = shift;
     my $c = shift;
 
+	# if hicell or hicell2 is "", do not print the class as it could mess up the gendercode
+    return "" if not length $self->{cfg}->{hicell} . $self->{cfg}->{hicell2};
+
     my $h = $self->{cfg}->{hicell} or return "class=\"hicell\"";
     $h =~ s/^#//;
     $h = hex $h;