فهرست منبع

Fix & conversion

Christoph Berg 22 سال پیش
والد
کامیت
3cf1075fa5
2فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 1 0
      docs/Changelog
  2. 3 4
      modules/Pisg/Common.pm

+ 1 - 0
docs/Changelog

@@ -1,6 +1,7 @@
 pisg (0.61) - ??
    Changes by Christoph Berg:
    * Fix warning when running on empty logs.
+   * Fix & conversion.
    * More nick sanitizing.
    * Remove whitespace around user pictures, border="0", title.
    * docs/:

+ 3 - 4
modules/Pisg/Common.pm

@@ -186,6 +186,9 @@ sub htmlentities
     my $str = shift;
     my $charset = shift;
 
+    $str =~ s/\&/\&/go;
+    $str =~ s/\</\&lt;/go;
+    $str =~ s/\>/\&gt;/go;
     if ($charset =~ /iso-8859-1/i) { # this is for people without Text::Iconv
         $str =~ s/ü/&uuml;/go;
         $str =~ s/ö/&ouml;/go;
@@ -199,10 +202,6 @@ sub htmlentities
         $str =~ s/Ø/&Oslash;/go;
         $str =~ s/\x95/\&bull;/go;
     }
-    $str =~ s/\&/\&amp;/go;
-    $str =~ s/\</\&lt;/go;
-    $str =~ s/\>/\&gt;/go;
-
     return $str;
 }