final Escaper escaper = UrlEscapers.urlFormParameterEscaper();
final String location = getServletContext().getContextPath() + _location.replace("@@lang@@", escaper.escape(lang))
.replace("@@nodeId@@", escaper.escape(nodeId))
.replace("@@redirectedFrom@@", escaper.escape(redirectedFrom))
.replace("@@oldNodeId@@", escaper.escape(oldNodeId))
.replace("@@oldUserName@@", escaper.escape(user.getName()));
String requestURI = httpServletRequest.getRequestURI();
// drop the ! at the end so we can view the xml of the warning page
if (requestURI.endsWith("!")) {
requestURI = requestURI.substring(0, requestURI.length() - 1);