Support Article

Check box caption displays HTML-encoded characters

SA-25761

Summary



Special characters are encoded on the User Interface (UI) when a field value referencing GetLocalizedValue control, to populate the caption of a check box, is used.
For example, entering a field value of " 's " (a blank, an apostrophe, alphabet s in lowercase, and a blank) results in " 's " value.
"Scenario’s" is displayed as "Scenario's"

Error Messages



Not Applicable

Steps to Reproduce



Design a check box with a caption that uses a field value. The value must reference another field value using GetLocalizedValue control.

Root Cause



A defect in Pegasystems’ code or rules, which encoded the field value twice.

Resolution



Perform the following local-change:
Save a copy of the GetLocalizedValue control into the application ruleset, and replace the code on the HTML tab with the code snippet given below:

<% 
if (tools.getActiveValue().length() > 0)  
         tools.putSaveValue("result", tools.getActive().getLocalizedText()); 
else 
    tools.putSaveValue("result", "");
%>
<pega:choose>
    <pega:when test='!$mode-input'>
        <%=tools.getSaveValue("result")%>
</pega:when>
        
    <pega:otherwise>
        <SPAN nowrap>
            <pega:include name="Messages"/>
            <input type=text 
            name="<pega:reference name="$this-name" />"
             value="<pega:reference name='$save(result)'/>" 
            id="<pega:reference name="$THIS-DEFINITION(pyPropertyName)" /><%= StringUtils.crossScriptingFilter(tools.getParamValue("pega_RLindex")) %>">
        </SPAN>
    </pega:otherwise>
</pega:choose>

Published July 19, 2016 - Updated July 26, 2016

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.