13
0
geforkt von Mirrors/Velocity

Fix escaping issues with spaces in server names

Fixes #320
Dieser Commit ist enthalten in:
Andrew Steinborn 2020-06-23 16:07:06 -04:00
Ursprung f7f4620b53
Commit 1fe01596d2

Datei anzeigen

@ -212,8 +212,8 @@ public abstract class AnnotatedConfig {
} }
protected static String escapeKeyIfNeeded(String key) { protected static String escapeKeyIfNeeded(String key) {
if (key.contains(".") && !(key.indexOf('"') == 0 && key.lastIndexOf('"') == (key.length() if ((key.contains(".") || key.contains(" "))
- 1))) { && !(key.indexOf('"') == 0 && key.lastIndexOf('"') == (key.length() - 1))) {
return '"' + key + '"'; return '"' + key + '"';
} }
return key; return key;