summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AndroidManifest.xml4
-rw-r--r--src/de/blinkt/openvpn/ConfigParser.java2
-rw-r--r--src/de/blinkt/openvpn/VpnProfile.java6
3 files changed, 8 insertions, 4 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 4a694c0b..0818447f 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -17,8 +17,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.blinkt.openvpn"
- android:versionCode="41"
- android:versionName="0.5.15" >
+ android:versionCode="43"
+ android:versionName="0.5.16" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
diff --git a/src/de/blinkt/openvpn/ConfigParser.java b/src/de/blinkt/openvpn/ConfigParser.java
index f9eac745..c8fb3870 100644
--- a/src/de/blinkt/openvpn/ConfigParser.java
+++ b/src/de/blinkt/openvpn/ConfigParser.java
@@ -472,7 +472,7 @@ public class ConfigParser {
for(Vector<Vector<String>> option:options.values()) {
for(Vector<String> optionsline: option) {
for (String arg : optionsline)
- custom+= arg + " ";
+ custom+= VpnProfile.openVpnEscape(arg) + " ";
}
custom+="\n";
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 + '"';
}