Răsfoiți Sursa

Fix charset problem.

Morten Brix Pedersen 23 ani în urmă
părinte
comite
22e3c2037a
3 a modificat fișierele cu 5 adăugiri și 2 ștergeri
  1. 3 0
      docs/Changelog
  2. 1 1
      modules/Pisg/Common.pm
  3. 1 1
      modules/Pisg/HTMLGenerator.pm

+ 3 - 0
docs/Changelog

@@ -1,3 +1,6 @@
+pisg (x.xx)
+   * Be in-casesensitive on charsets.
+
 pisg (0.45) - Wed Feb, 5th 2003
    * Fix 3 small gramattical errors in english language. (thanks Cheetah)
    * Add half-op support to irssi format. (thanks, arsonist)

+ 1 - 1
modules/Pisg/Common.pm

@@ -186,7 +186,7 @@ sub htmlentities
     my $str = shift;
     my $charset = shift;
 
-    if ($charset eq "iso-8859-1" or $charset eq "iso-8859-15") {
+    if ($charset =~ /iso-8859-1/i) {
         $str =~ s/\&/\&/go;
         $str =~ s/\</\&lt;/go;
         $str =~ s/\>/\&gt;/go;

+ 1 - 1
modules/Pisg/HTMLGenerator.pm

@@ -1497,7 +1497,7 @@ sub _template_text
     foreach my $key (sort keys %hash) {
         $text =~ s/\[:$key\]/$hash{$key}/;
 
-        if ($self->{cfg}->{charset} eq "iso-8859-1" or $self->{cfg}->{charset} eq "iso-8859-15") {
+        if ($self->{cfg}->{charset} =~ /iso-8859-1/i) {
             $text =~ s/ü/&uuml;/go;
             $text =~ s/ö/&ouml;/go;
             $text =~ s/ä/&auml;/go;