Phoenix dynamically generate radio buttons

Any closing delimiter matching the opening delimiter has to be escaped, that is by design of the sigils.,

As a rule of thumb, when you have multiline content just use """ or '''. They will rarely occur in your literal. If your snippet were a onliner, you could also use ', [/], or {/} as delimiter, which seem to not clash on a first glance.