APIs & Integrations

jsingque
Miembro

Custom property with apostrophe in subject line

resolver

Hi there,

 

I'm currently having a problem with the subject line rendering an apostrophe (') which renders it as ' . The same property renders just fine in the body though.

 

The value is a custom property sent from our API.

0 Me gusta
1 Soluciones aceptada
BarryGrennan
Solución
Colaborador líder

Custom property with apostrophe in subject line

resolver

How about something like:

 

 

{{ your_property|regex_replace("'", "'") }}

 

Edit: Per the documentation you can't apply filters to personalization tokens in emails. That likely affects what I was suggesting here.

Although in running a quick email test using surnames with apostrophes in them in the subject line, I'm not running into the same issue. Granted that's not through an API though.

Ver la solución en mensaje original publicado

5 Respuestas 5
BarryGrennan
Colaborador líder

Custom property with apostrophe in subject line

resolver

Can you use filters like urldecode?


profile2022aBarry Grennan

Freelance HubSpot CMS Developer

Website | Contact

 

 

 

0 Me gusta
jsingque
Miembro

Custom property with apostrophe in subject line

resolver

Hi Barry,

 

Thanks for the reply. Unfortunately, I've tried that, as well as replace and the escape filters. It seems that they are not working as its supposed to.

0 Me gusta
BarryGrennan
Solución
Colaborador líder

Custom property with apostrophe in subject line

resolver

How about something like:

 

 

{{ your_property|regex_replace("'", "'") }}

 

Edit: Per the documentation you can't apply filters to personalization tokens in emails. That likely affects what I was suggesting here.

Although in running a quick email test using surnames with apostrophes in them in the subject line, I'm not running into the same issue. Granted that's not through an API though.

SStrachan1
Participante

Custom property with apostrophe in subject line

resolver

I have the same problem. I tried this above but I cant save the email 

 

{{ personalization_token('contact.workflow_yacht_name|regex_replace("'", "") }}I get the following error:

 

Required fields and warnings

Required fields

  1. The token {{ personalization_token('contact.workflow_yacht_name is incorrectly formatted. A token should look like {{ token }} or {{ personalization_token("token", "default fallback") }}



0 Me gusta
Jaycee_Lewis
Administrador de la comunidad
Administrador de la comunidad

Custom property with apostrophe in subject line

resolver

Thanks, @BarryGrennan!

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Me gusta