<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Updating properties with html which contains double quotes in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Updating-properties-with-html-which-contains-double-quotes/m-p/864958#M68255</link>
    <description>&lt;P&gt;I never managed to get the import to work with double quotes.&amp;nbsp; Regardless of how I escaped them in the JSON when updating the contact property, they would not render correctly when used in the email.&amp;nbsp; Instead, I reworked the html to use single quotes instead of double quotes to avoid having to escape any special characters.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Oct 2023 14:21:12 GMT</pubDate>
    <dc:creator>MichaelBrock</dc:creator>
    <dc:date>2023-10-16T14:21:12Z</dc:date>
    <item>
      <title>Updating properties with html which contains double quotes</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Updating-properties-with-html-which-contains-double-quotes/m-p/863634#M68177</link>
      <description>&lt;P&gt;I'm working on a project for a client that wants to send a weekly sales email via HubSpot.&amp;nbsp; The email is customized each week and uses html/css. I am currently using the json api to import the email body for every contact each week into a custom property which the client then uses to format the email.&amp;nbsp; However, we are having issues with the formating of the email.&amp;nbsp;&amp;nbsp; Sending the email body in html via json api requires escaping the double quotes but their process of using the property contents for the email is not working with that and it is failing to "unescape" the double quotes.&amp;nbsp; I attepted escaping the double quotes as \", \\", and also replacing them with &amp;amp;quot; but nothing is working.&amp;nbsp; Any ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 15:32:01 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Updating-properties-with-html-which-contains-double-quotes/m-p/863634#M68177</guid>
      <dc:creator>MichaelBrock</dc:creator>
      <dc:date>2023-10-12T15:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Updating properties with html which contains double quotes</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Updating-properties-with-html-which-contains-double-quotes/m-p/864022#M68203</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/580017"&gt;@MichaelBrock&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Thank you for reaching out to the Community!&lt;BR /&gt;&lt;BR /&gt;I'd like to tag&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/307689"&gt;@SKathara&lt;/a&gt;: Hi, regarding this similar post "&lt;A href="https://community.hubspot.com/t5/APIs-Integrations/Import-API-Failing-because-of-double-quotes/td-p/568804" target="_blank" rel="noopener"&gt;Import API Failing because of double quotes&lt;/A&gt;" how did you solve it, please, to help&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/580017"&gt;@MichaelBrock&lt;/a&gt;?&lt;BR /&gt;&lt;BR /&gt;I see that you mentioned "&lt;SPAN&gt;My code was escaping the " with a \ and that was causing issue.&lt;/SPAN&gt;".&lt;BR /&gt;&lt;BR /&gt;I'd like to get the insights of other subject matter experts on this:&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/341938"&gt;@MBERARD&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/146956"&gt;@BarryGrennan&lt;/a&gt;&amp;nbsp;do you have any advice to help&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/580017"&gt;@MichaelBrock&lt;/a&gt;, please?&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Also, if anybody else has anything to add and/or share, please feel free to join in the conversation&lt;/STRONG&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks and have a fantastic day!&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Bérangère&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 08:44:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Updating-properties-with-html-which-contains-double-quotes/m-p/864022#M68203</guid>
      <dc:creator>BérangèreL</dc:creator>
      <dc:date>2023-10-13T08:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Updating properties with html which contains double quotes</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Updating-properties-with-html-which-contains-double-quotes/m-p/864958#M68255</link>
      <description>&lt;P&gt;I never managed to get the import to work with double quotes.&amp;nbsp; Regardless of how I escaped them in the JSON when updating the contact property, they would not render correctly when used in the email.&amp;nbsp; Instead, I reworked the html to use single quotes instead of double quotes to avoid having to escape any special characters.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 14:21:12 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Updating-properties-with-html-which-contains-double-quotes/m-p/864958#M68255</guid>
      <dc:creator>MichaelBrock</dc:creator>
      <dc:date>2023-10-16T14:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Updating properties with html which contains double quotes</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Updating-properties-with-html-which-contains-double-quotes/m-p/865071#M68262</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/580017"&gt;@MichaelBrock&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;just a thought:&amp;nbsp;&lt;BR /&gt;Since you're working with API to generate the email - would it be a an option to do it something like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;... 
{% set email_body = Result of the JSON %}

&amp;lt;body&amp;gt;
{{ email_body|escape_json }}
&amp;lt;/body&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;...
{% set email_body = "{YOUR JSON result}"%}

&amp;lt;body&amp;gt;
{{ email_body|fromjson }}
&amp;lt;/body&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here's a description of the filters:&lt;/P&gt;
&lt;P&gt;- &lt;A href="https://developers.hubspot.com/docs/cms/hubl/filters#escapejson" target="_blank" rel="noopener"&gt;escape_json&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;- &lt;A href="https://developers.hubspot.com/docs/cms/hubl/filters#fromjson" target="_blank" rel="noopener"&gt;fromjson&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 16:26:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Updating-properties-with-html-which-contains-double-quotes/m-p/865071#M68262</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2023-10-16T16:26:34Z</dc:date>
    </item>
  </channel>
</rss>

