Escaping quotes in velocity token | Community
Skip to main content
New Participant
September 28, 2021
Question

Escaping quotes in velocity token

  • September 28, 2021
  • 1 reply
  • 1643 views

 

 

'Let''s have fun with "quotes"', "Let's have fun with ""quotes"""

 

 

Below error is throwing while evaluating the above strings with double quotes for a custom object CO field itemDetails1

 

Cannot get email content- <div>An error occurred when procesing the email Body! </div> <p>Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 1, column 7. Encountered: "\u00e0" (224), after : "" near</p> <div><pre > #set( $jsonDetails1 = '#set( $jsonDetails1 = ' + $CO_c[&quot;itemDetails1&quot;] + ' )' )</pre><pre > #evaluate( $jsonDetails1 )</pre><pre class="x-form-item-label"> #end</pre><pre > #if( !$CO_c[&quot;itemDetails2&quot;].isEmpty() )</pre><pre > #set( $jsonDetails2 = '#set( $jsonDetails2 = ' + $CO_c[&quot;triggerDetails2&quot;] + ' )' )</pre></div>

 

is there a workaround in Marketo to evaluate the double quotes?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
New Participant
September 28, 2021

Please provide the full contents of the Textarea field.

Note you need to escape reserved characters using \u0000 format, not shortcuts like \".