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 edcb565a0..bc15f3f02 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 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)); } /**