Co-authored-by: Douglas Mennella <douglas.mennella@gmail.com>
This commit is contained in:
parent
b8475ca7be
commit
5bbc4ae304
@ -58,6 +58,7 @@ import com.google.refine.exporters.StreamExporter;
|
||||
import com.google.refine.exporters.WriterExporter;
|
||||
import com.google.refine.exporters.sql.SqlExporterException;
|
||||
import com.google.refine.model.Project;
|
||||
import com.google.common.net.PercentEscaper;
|
||||
|
||||
public class ExportRowsCommand extends Command {
|
||||
private static final Logger logger = LoggerFactory.getLogger("ExportRowsCommand");
|
||||
@ -105,7 +106,9 @@ public class ExportRowsCommand extends Command {
|
||||
if (!"true".equals(preview)) {
|
||||
String path = request.getPathInfo();
|
||||
String filename = path.substring(path.lastIndexOf('/') + 1);
|
||||
response.setHeader("Content-Disposition", "attachment; filename=" + filename);
|
||||
PercentEscaper escaper = new PercentEscaper("", false);
|
||||
filename = escaper.escape(filename);
|
||||
response.setHeader("Content-Disposition", "attachment; filename=" +filename+"; filename*=utf-8' '" + filename);
|
||||
}
|
||||
|
||||
if (exporter instanceof WriterExporter) {
|
||||
|
Loading…
Reference in New Issue
Block a user