-/* ownCloud Android client application\r
+/**\r
+ * ownCloud Android client application\r
*\r
* @author Bartek Przybylski\r
* @author David A. Velasco\r
* Copyright (C) 2011 Bartek Przybylski\r
- * Copyright (C) 2012-2013 ownCloud Inc.\r
+ * Copyright (C) 2015 ownCloud Inc.\r
*\r
* This program is free software: you can redistribute it and/or modify\r
* it under the terms of the GNU General Public License version 2,\r
} else if (url.indexOf("@") != -1) {\r
hostStart = url.indexOf("@") + "@".length();\r
}\r
- \r
+\r
int hostEnd = url.substring(hostStart).indexOf("/");\r
// Handle URL which doesn't have a path (path is implicitly '/')\r
hostEnd = (hostEnd == -1 ? url.length() : hostStart + hostEnd);\r
- \r
+\r
String host = url.substring(hostStart, hostEnd);\r
host = (toASCII ? IDN.toASCII(host) : IDN.toUnicode(host));\r
- \r
+\r
return url.substring(0, hostStart) + host + url.substring(hostEnd);\r
} else {\r
return url;\r