]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 423439: show_bug.cgi crashes when wrapping comments which contain Unicode charact...
authorlpsolit%gmail.com <>
Fri, 28 Mar 2008 17:33:13 +0000 (17:33 +0000)
committerlpsolit%gmail.com <>
Fri, 28 Mar 2008 17:33:13 +0000 (17:33 +0000)
Bugzilla/Util.pm

index 1471295fc348c2d2ef043e49069ceef30ecb2004..da41008e151e3cbf3bb6d8b30806df45e87db05e 100644 (file)
@@ -312,6 +312,11 @@ sub wrap_comment {
         $wrappedcomment .= ($line . "\n");
       }
       else {
+        # Due to a segfault in Text::Tabs::expand() when processing tabs with
+        # Unicode (see http://rt.perl.org/rt3/Public/Bug/Display.html?id=52104),
+        # we have to remove tabs before processing the comment. This restriction
+        # can go away when we require Perl 5.8.9 or newer.
+        $line =~ s/\t/    /g;
         $wrappedcomment .= (wrap('', '', $line) . "\n");
       }
     }