Support Article
Mashup loads incorrectly when email address contains apostrophe
Summary
Mashup is used by the client and the end user email address is used by the UserIdentifier in the data-pega-action-param-parameters. The Mashup loads incorrectly when the email address contains an apostrophe.
For example, Mary_O'[email protected].
Error Messages
com.pegarules.pub.context.PRSecurityException thrown to the digital delivery logs with a java stack trace
Steps to Reproduce
Access a mashup where the data-pega-action-param-parameters="{UserIdentifier:'Mary_O'[email protected]'}".
Root Cause
The content of the parameter value contained a single quote, the same character that was used to encase the parameter value. Hence, issues related to parameter parsing occur. The value of the UserIdentifier is rendered by a JSP or other type of include during the design time. The content may contain a special character during runtime.
Resolution
Perform the following local-change:
Use the Mashup databinding.
For example,
<script>
function dataFromPage(key){
if (key == "UserID"){
return "Mary_O'[email protected]";
}
}
</script>
Div Attributes:
data-pega-action-param-parameters="{UserIdentifier:'[page/function/UserID]'}"
data-pega-event-onPageData="dataFromPage"
Published April 4, 2019 - 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.