Last active
August 29, 2015 14:11
-
-
Save shamalroy/0b1a2ef18ee9db82e125 to your computer and use it in GitHub Desktop.
AEM (Adobe CQ) XSSAPI example in JSP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ include file="/libs/foundation/global.jsp" %> | |
<% | |
String siteTitle = request.getParameter("siteTitle"); | |
String websiteLink = request.getParameter("websiteLink"); | |
%> | |
<html> | |
<head> | |
<title> | |
<%= xssAPI.encodeForHTML(siteTitle); %> | |
</title> | |
</head> | |
<body> | |
<a href="<%= xssAPI.getValidHref(websiteLink); %>">Website Link</a> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment