From 6d0bb02544ae182328ca29d6189d8846613ab283 Mon Sep 17 00:00:00 2001 From: akko Date: Fri, 13 Oct 2023 11:28:09 +0700 Subject: [PATCH] adds quotation to create filename util replacement char --- app/src/main/java/org/schabi/newpipe/util/FilenameUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/util/FilenameUtils.java b/app/src/main/java/org/schabi/newpipe/util/FilenameUtils.java index edcb565a04b..bc15f3f0242 100644 --- a/app/src/main/java/org/schabi/newpipe/util/FilenameUtils.java +++ b/app/src/main/java/org/schabi/newpipe/util/FilenameUtils.java @@ -7,6 +7,7 @@ import org.schabi.newpipe.R; +import java.util.regex.Matcher; import java.util.regex.Pattern; public final class FilenameUtils { @@ -51,7 +52,7 @@ public static String createFilename(final Context context, final String title) { final Pattern pattern = Pattern.compile(charset); - return createFilename(title, pattern, replacementChar); + return createFilename(title, pattern, Matcher.quoteReplacement(replacementChar)); } /**