APIs & Integrations

jsingque
Member

Custom property with apostrophe in subject line

SOLVE

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 Upvotes
1 Accepted solution
BarryGrennan
Solution
Top Contributor

Custom property with apostrophe in subject line

SOLVE

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.

View solution in original post

4 Replies 4
BarryGrennan
Top Contributor

Custom property with apostrophe in subject line

SOLVE

Can you use filters like urldecode?


profile2022aBarry Grennan

Freelance HubSpot CMS Developer

Website | Contact

 

 

 

0 Upvotes
jsingque
Member

Custom property with apostrophe in subject line

SOLVE

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 Upvotes
BarryGrennan
Solution
Top Contributor

Custom property with apostrophe in subject line

SOLVE

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.

Jaycee_Lewis
Community Manager
Community Manager

Custom property with apostrophe in subject line

SOLVE

Thanks, @BarryGrennan!

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes