Interface UrlFormatter
public interface UrlFormatter
Cleans up urls that go into chat components, where a raw ampersand or a non-ASCII host
would otherwise be mangled.
-
Method Summary
Modifier and TypeMethodDescriptionescapeAmpersand(String url) Escapes ampersands so they are not read as legacy color codes.Converts an international domain name to its ASCII form, so the client can open it.unescapeAmpersand(String url) Restores ampersands escaped byescapeAmpersand(String).
-
Method Details
-
escapeAmpersand
-
unescapeAmpersand
Restores ampersands escaped byescapeAmpersand(String).- Parameters:
url- the escaped url- Returns:
- the original url
-
toASCII
-