Bug 423439: show_bug.cgi crashes when wrapping comments which contain Unicode characters and tabs in them - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat

git-svn-id: svn://10.0.0.236/trunk@248763 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
lpsolit%gmail.com 2008-03-28 12:33:13 +00:00
parent a14e24e18d
commit 0f6700a459

View 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");
}
}