Examples of encodeForHTMLAttribute()


Examples of org.owasp.esapi.Encoder.encodeForHTMLAttribute()

    protected void populateVelocityContext(VelocityContext velocityContext, SAMLMessageContext messageContext,
            String endpointURL) throws MessageEncodingException {
       
        Encoder esapiEncoder = ESAPI.encoder();

        String encodedEndpointURL = esapiEncoder.encodeForHTMLAttribute(endpointURL);
        log.debug("Encoding action url of '{}' with encoded value '{}'", endpointURL, encodedEndpointURL);
        velocityContext.put("action", encodedEndpointURL);

        log.debug("Marshalling and Base64 encoding SAML message");
        if (messageContext.getOutboundSAMLMessage().getDOM() == null) {
View Full Code Here

Examples of org.owasp.esapi.Encoder.encodeForHTMLAttribute()

            throw new MessageEncodingException("Unable to encode message, UTF-8 encoding is not supported");
        }

        String relayState = messageContext.getRelayState();
        if (checkRelayState(relayState)) {
            String encodedRelayState = esapiEncoder.encodeForHTMLAttribute(relayState);
            log.debug("Setting RelayState parameter to: '{}', encoded as '{}'", relayState, encodedRelayState);
            velocityContext.put("RelayState", encodedRelayState);
        }
    }
}
View Full Code Here

Examples of org.owasp.esapi.Encoder.encodeForHTMLAttribute()

       switch(encFor){
       //case ENC_CSS:return encoder.encodeForBase64(item);
       case ENC_CSS:return encoder.encodeForCSS(item);
       case ENC_DN:return encoder.encodeForDN(item);
       case ENC_HTML:return encoder.encodeForHTML(item);
       case ENC_HTML_ATTR:return encoder.encodeForHTMLAttribute(item);
       case ENC_JAVA_SCRIPT:return encoder.encodeForJavaScript(item);
       case ENC_LDAP:return encoder.encodeForLDAP(item);
       //case ENC_CSS:return encoder.encodeForOS(arg0, arg1)(item);
       //case ENC_CSS:return encoder.encodeForSQL(arg0, arg1)CSS(item);
       case ENC_URL:return encoder.encodeForURL(item);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.