Chris_Shaffer_hcsc

Handling amersand in GEL (not in a XOG)

Discussion created by Chris_Shaffer_hcsc on Dec 29, 2010
Latest reply on Dec 29, 2010 by Chris_Shaffer_hcsc
I have a fairly simple question. I have a simple process where I query to get project names, loop and build one massive list, then send that list to an email.

The problem is that one of the projects has an ampersand in the name.

I have seen CDATA and other methods used before in actual XOG scripts to handle it but what about in other aspects of GEL?

(I have condensed my code to something more user friendly)
<sql:query var="qry_locked">
        Select INV.Name From INV_INVESTMENTS INV where ID = 50000123
</sql:query>

<core:forEach items="${qry_locked.rowsByIndex}" var="row">

<core:set var="V_LOCKED_NAME" ><![CDATA[${row[0]}]]></core:set>

<core:set var="LST_LOCKED">${LST_LOCKED} ${V_LOCKED_NAME}</core:set>
</core:forEach>

<gel:email 
   from="Myemail@server.com"
   fromName="Clarity"
   subject="ACTION REQUIRED" 
   to="myemail@server.com">

   Hello, 

   This is a test of looping to send one email. 


   ${LST_LOCKED}


</gel:email>
When I get the email it has the project name with "amp;" instead of the &. HELP!

Thanks!

Outcomes