diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2010-03-08 01:47:41 +0100 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2010-03-08 01:47:41 +0100 |
commit | ccdd4db8db7691ac676b05108b355b9b95ac1da1 (patch) | |
tree | 4cc49f9571d478f4668033ac8e5ae8c8c82596d4 /showdependencygraph.cgi | |
parent | bec277d2e7322b6a4b48b17ae092aefb07f24206 (diff) | |
download | bugzilla-ccdd4db8db7691ac676b05108b355b9b95ac1da1.tar.gz bugzilla-ccdd4db8db7691ac676b05108b355b9b95ac1da1.tar.xz |
Bug 542464: Dependency graphs cannot be displayed when bug summaries contain UTF8 characters
r/a=mkanat
Diffstat (limited to 'showdependencygraph.cgi')
-rwxr-xr-x | showdependencygraph.cgi | 6 |
1 files changed, 5 insertions, 1 deletions
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 = "<map name=\"imagemap\">\n"; - my $default; + my $default = ""; open MAP, "<$mapfilename"; while(my $line = <MAP>) { @@ -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"}); } |