/** * Return a string based on id that is fully escaped using URL rules, using a UTF-8 underlying encoding. * * Note: java.net.URLEncode.encode() provides a more standard option * FormattedText.decodeNumericCharacterReferences() undoes this op * * @param id * The string to escape. * @return id fully escaped using URL rules. * @deprecated just a passthrough for {@link Validator#escapeUrl(String)} so use that instead */ public static String escapeUrl(String id) { return Validator.escapeUrl( id ); } // escapeUrl
public String getEntityUrl(Reference ref) { return ServerConfigurationService.getAccessUrl() + Validator.escapeUrl(ref.getReference()); }
/** * Access the alternate URL which can be used to access the entity. * * @param id * The resource id. * @param rootProperty * The name of the entity property whose value controls which alternate reference URL is requested. If null, the native 'raw' URL is requested. * @return The resource URL. */ public String getUrl(String id, String rootProperty) { // escape just the is part, not the access point // return getAccessPoint(false) + Validator.escapeUrl(id); return m_serverConfigurationService.getAccessUrl() + getAlternateReferenceRoot(id, rootProperty) + m_relativeAccessPoint + Validator.escapeUrl(convertIdToUserEid(id)); } // getUrl
session.setAttribute(Tool.HELPER_DONE_URL, Web.returnUrl(req, Validator.escapeUrl(path)));
setVmReference("tlang", rb, req); String acceptPath = Web.returnUrl(req, COPYRIGHT_ACCEPT + "?" + COPYRIGHT_ACCEPT_REF + "=" + Validator.escapeUrl(aRef.getReference()) + "&" + COPYRIGHT_ACCEPT_URL + "=" + Validator.escapeUrl(returnPath)); String returnPath = Validator.escapeUrl( req.getParameter(COPYRIGHT_ACCEPT_URL) ); String redirPath = COPYRIGHT_REQUIRE + "?" + COPYRIGHT_ACCEPT_REF + "=" + Validator.escapeUrl(e.getReference()) + "&" + COPYRIGHT_ACCEPT_URL + "=" + Validator.escapeUrl(req.getPathInfo()); res.sendRedirect(Web.returnUrl(req, redirPath));