Haven't been able to get a reply from the guys at CartThrob since November, so hopefully someone here can help out.
We have the following in our add to cart form:
{if cf_products_stampinglimit}
<p>
<label for="stamping">
<span class="label">Stamping:</span>
{item_options:input:stamping type="text" value=""}
<span class="note">Character limit: {cf_products_stampinglimit}. If you're ordering more than one charm, separate each stamp with a comma.</span>
</label>
</p>
{/if}
While it works well 99% of the time, I’ve recently discovered that if a customer types something like “a + b” in the field, then the email shows up blank or with this error message:
Parse error: syntax error, unexpected T_STRING in /my/path/to/system/expressionengine/libraries/Functions.php(680) : eval()'d code on line 94
The field is filled out just fine in the order entry though (i.e., it gets saved just fine). Here’s the code snippet for that piece in the email template:
{if "{item:stamping}"}Stamping: <em>{item:stamping}</em><br />{/if}
I’ve tested this extensively and the email appears normally unless it has something like “x + x”. Any idea on how to fix this?
Running EE 2.5.2 and CartThrob 2.1.5.
Update: We've since upgraded to EE 2.5.5 and CT 2.2.9 and now, instead of getting a blank email, this error is sent instead:
Parse error: syntax error, unexpected '" != "' (T_CONSTANT_ENCAPSED_STRING) in /path/to/system/expressionengine/libraries/Functions.php(683) : eval()'d code on line 81
Additionally, this is the case for various characters: + & ;