Explorar o código

Replace < with &lt; and > with &gt; even when character set is not default

sbingner %!s(int64=23) %!d(string=hai) anos
pai
achega
9029c0c227
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      modules/Pisg/Common.pm

+ 3 - 0
modules/Pisg/Common.pm

@@ -200,6 +200,9 @@ sub htmlentities
         $str =~ s/Å/&Aring;/go;
         $str =~ s/Æ/&AElig;/go;
         $str =~ s/Ø/&Oslash;/go;
+    } else {
+        $str =~ s/\</\&lt;/go;
+        $str =~ s/\>/\&gt;/go;
     }
 
     return $str;