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