Merge pull request #10489 from sqproman/missing_quotation_replace_char_crash

Quote filename replacement characters to fix crashes when downloading streams with special characters
This commit is contained in:
Stypox 2023-11-16 20:19:01 +01:00 committed by GitHub
commit 545f9ae5f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import androidx.preference.PreferenceManager;
import org.schabi.newpipe.R;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public final class FilenameUtils {
@ -51,7 +52,7 @@ public final class FilenameUtils {
final Pattern pattern = Pattern.compile(charset);
return createFilename(title, pattern, replacementChar);
return createFilename(title, pattern, Matcher.quoteReplacement(replacementChar));
}
/**