Commit 61ec5e90 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 376911: Non-text content-types require setting the charset manually in the…

Bug 376911: Non-text content-types require setting the charset manually in the $cgi->header() call - Patch by guillomovitch@zarb.org r=gerv a=mkanat
parent 208399b5
......@@ -266,7 +266,13 @@ my $format = $template->get_format("reports/duplicates",
scalar($cgi->param('format')),
scalar($cgi->param('ctype')));
print $cgi->header($format->{'ctype'});
# We set the charset in Bugzilla::CGI, but CGI.pm ignores it unless the
# Content-Type is a text type. In some cases, such as when we are
# generating RDF, it isn't, so we specify the charset again here.
print $cgi->header(
-type => $format->{'ctype'},
(Bugzilla->params->{'utf8'} ? ('charset', 'utf8') : () )
);
# Generate and return the UI (HTML page) from the appropriate template.
$template->process($format->{'template'}, $vars)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment