From ccdd4db8db7691ac676b05108b355b9b95ac1da1 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Mon, 8 Mar 2010 01:47:41 +0100 Subject: Bug 542464: Dependency graphs cannot be displayed when bug summaries contain UTF8 characters r/a=mkanat --- showdependencygraph.cgi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'showdependencygraph.cgi') diff --git a/showdependencygraph.cgi b/showdependencygraph.cgi index 9b3437ebc..e73b1f633 100755 --- a/showdependencygraph.cgi +++ b/showdependencygraph.cgi @@ -58,7 +58,7 @@ local our (%seen, %edgesdone, %bugtitles); sub CreateImagemap { my $mapfilename = shift; my $map = "\n"; - my $default; + my $default = ""; open MAP, "<$mapfilename"; while(my $line = ) { @@ -206,6 +206,10 @@ foreach my $k (keys(%seen)) { my @params; if ($summary ne "" && $cgi->param('showsummary')) { + # Wide characters cause GraphViz to die. + if (Bugzilla->params->{'utf8'}) { + utf8::encode($summary) if utf8::is_utf8($summary); + } $summary =~ s/([\\\"])/\\$1/g; push(@params, qq{label="$k\\n$summary"}); } -- cgit v1.2.3-24-g4f1b