Support Article
ShowTextEncrypted doesn't display special characters correctly
SA-34204
Summary
When we use a property type of TextEncrypted special characters are not displayed correctly after decryption.
For example an apostrophe shows as "'" In versions prior to 7.2.2, Pega’s ShowTextEncrypted UI control decrypts encrypted items prior to display on the UI, as it should. However, if the original cleartext data contained certain special characters (such a the apostrophe in the name O’Reilly), then the ShowTextEncrypted control does not display those characters correctly after decryption. It shows something like &29%; for the apostrophe. O’Reilly is displayed as something like O&29%;Reilly.
Error Messages
Not Applicable
Steps to Reproduce
Try to decrypt a property with an apostrophe in it.
Root Cause
A defect in Pegasystems’ code or rules
Resolution
Perform the following local-change:
Save ShowTextEncryptedPropertyValue control to your own ruleset. In the “read only” and “display only” otherwise branches added the same call.
<!-- read only -->
<pega:otherwise>
<div id = "decodeIt" class='' style=''>
<pega:reference name="$save(sensitiveValue)"/>
<script language="javascript">
document.getElementById("decodeIt").innerHTML=document.getElementById("decodeIt").innerText;
</script>
</div>
</pega:otherwise>
</pega:choose>
</pega:when>
<!-- display only -->
<pega:otherwise>
<div id = "decodeIt2" class='' style=''>
<pega:reference name="$save(sensitiveValue)"/>
<script language="javascript">
document.getElementById("decodeIt2").innerHTML=document.getElementById("decodeIt2").innerText;
</script>
</div>
</pega:otherwise>
Published March 1, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.