String (@NotNull String s) { try { return URLEncoder.encode(s, StandardCharsets.UTF_8.name()) .replace("+", "%20") .replace("%21", "!") .replace("%27", "'") .replace("%28", "(") .replace("%29", ")") .replace("%7E", "~"); } catch (UnsupportedEncodingException e) { return s; } }