mirror of
https://github.com/revanced/jadb.git
synced 2025-05-07 18:04:31 +02:00
Check other whitespace characters, e.g. tabs
This commit is contained in:
parent
99555a53f0
commit
e441c96c85
@ -2,8 +2,8 @@ package se.vidstige.jadb.managers;
|
||||
|
||||
public class Bash {
|
||||
public static String quote(String s) {
|
||||
// TODO: Should also check other whitespace
|
||||
if (!s.contains(" ")) {
|
||||
// Check that s contains no whitespace
|
||||
if (s.matches("\\S+")) {
|
||||
return s;
|
||||
}
|
||||
return "'" + s.replace("'", "'\\''") + "'";
|
||||
|
Loading…
x
Reference in New Issue
Block a user