From 83525a83dc214c33e5a3ecd009eaec639b54accf Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Wed, 25 Jul 2012 15:22:47 +0200 Subject: Fix importing custom options with spaces --- src/de/blinkt/openvpn/VpnProfile.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/de/blinkt/openvpn/VpnProfile.java') diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java index f6c3261a..4e381fcc 100644 --- a/src/de/blinkt/openvpn/VpnProfile.java +++ b/src/de/blinkt/openvpn/VpnProfile.java @@ -117,7 +117,11 @@ public class VpnProfile implements Serializable{ String escapedString = unescaped.replace("\\", "\\\\"); escapedString = escapedString.replace("\"","\\\""); escapedString = escapedString.replace("\n","\\n"); - return '"' + escapedString + '"'; + + if (escapedString.equals(unescaped) && !escapedString.contains(" ")) + return unescaped; + else + return '"' + escapedString + '"'; } -- cgit v1.2.3