Encode userIdClaimURI and roleClaimURI when displayed
identityProviderClaims = identityProvider.getClaimConfig().getIdpClaims();
- userIdClaimURI = Encode.forHtmlContent(identityProvider.getClaimConfig().getUserClaimURI());
- roleClaimURI = Encode.forHtmlContent(identityProvider.getClaimConfig().getRoleClaimURI());
+ userIdClaimURI = identityProvider.getClaimConfig().getUserClaimURI();
+ roleClaimURI = identityProvider.getClaimConfig().getRoleClaimURI();
claimMappings = identityProvider.getClaimConfig().getClaimMappings();
$idpClaimsList2.empty();
- if ('<%=userIdClaimURI%>' == '') {
+ if ('<%=Encode.forJavaScriptBlock(userIdClaimURI)%>' == '') {
$user_id_claim_dropdown.append('<option value = "">--- Select Claim URI ---</option>');
} else {
$user_id_claim_dropdown.append('<option selected="selected" value = "">--- Select Claim URI ---</option>');
}
- if ('<%=roleClaimURI%>' == '') {
+ if ('<%=Encode.forJavaScriptBlock(roleClaimURI)%>' == '') {
$role_claim_dropdown.append('<option value = "">--- Select Claim URI ---</option>');
} else {
$role_claim_dropdown.append('<option selected="selected" value = "">--- Select Claim URI ---</option>');
jQuery('#claimAddTable .claimrow').each(function () {
var val = htmlEncode($(this).val());
if (val.trim() != "") {
- if (val == '<%=userIdClaimURI%>') {
+ if (val == '<%=Encode.forJavaScriptBlock(userIdClaimURI)%>') {
$user_id_claim_dropdown.append('<option selected="selected">' + val + '</option>');
} else {
$user_id_claim_dropdown.append('<option>' + val + '</option>');
}
- if (val == '<%=roleClaimURI%>') {
+ if (val == '<%=Encode.forJavaScriptBlock(roleClaimURI)%>') {
$role_claim_dropdown.append('<option selected="selected">' + val + '</option>');
} else {
$role_claim_dropdown.append('<option>' + val + '</option>');
