mirror of
https://github.com/revanced/jadb.git
synced 2025-05-08 02:14: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 class Bash {
|
||||||
public static String quote(String s) {
|
public static String quote(String s) {
|
||||||
// TODO: Should also check other whitespace
|
// Check that s contains no whitespace
|
||||||
if (!s.contains(" ")) {
|
if (s.matches("\\S+")) {
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
return "'" + s.replace("'", "'\\''") + "'";
|
return "'" + s.replace("'", "'\\''") + "'";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user