Skip to content

Commit

Permalink
adds quotation to create filename util replacement char
Browse files Browse the repository at this point in the history
  • Loading branch information
sqproman committed Oct 13, 2023
1 parent 6f51c47 commit 6d0bb02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/main/java/org/schabi/newpipe/util/FilenameUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import org.schabi.newpipe.R;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public final class FilenameUtils {
Expand Down Expand Up @@ -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));
}

/**
Expand Down

0 comments on commit 6d0bb02

Please sign in to comment.