Commit ae055438 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1840733: fix zip filename corrupted on download"

parents c541934b a2c14d3d
......@@ -53,7 +53,7 @@ function can_download_artefact($artefact) {
function zip_filename_from($name) {
$name = preg_replace('#\s+#', '_', strtolower($name));
// \pL is used to match any letter in any alphabet (http://php.net/manual/en/regexp.reference.unicode.php)
$name = preg_replace('#[^\pL0-9_\-]+#', '', $name);
$name = extension_loaded('mbstring') ? mb_eregi_replace('#[^\pL0-9_\-]+#', '', $name) : preg_replace('#[^\pL0-9_\-]+#', '', $name);
if ($name != '') {
$name = '-' . $name;
}
......
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