Single quote in "public" event page title throws smarty error on receipt
Overview
Reproduced on a blank 5.64.2 buildkit site. If a contribution page has a single quote in the title, is set to "is_share", and has receipts on, a user registering will receive this gross message during the registration process:
Reproduction steps
- On 5.64.0+ add (or edit) an event page to have a single quote in the page title such as
What's a quote doing here
- Check off "is_share" and turn on receipt emails.
- Run through a registration on the front-end to observe the issue.
Comments
It looks like maybe this commit introduced this but it's hard to follow: https://github.com/civicrm/civicrm-core/commit/e90b263a9ccd7c8106c98f5f7f82d4b267820f43#diff-2652c5ed241e0c2a68dc79d97ce2b6056ad2bc8ce37aee9bce8dd69678a160a8L167
Either way the issue is coming from this line in the workflow message template {include file="CRM/common/SocialNetwork.tpl" emailMode=true url=$eventUrl title=$event.title pageURL=$eventUrl}
where the event title needs to have single quotes escaped or something of that nature to make it through smarty.