Skip to main content
Answered

New line being added to article after paragraph when updating via API

  • 5 December 2024
  • 5 replies
  • 33 views

When I pull down an example line in the body via API I get something like this:

\n<p class=\"no-margin\"></p>\n<p class=\"no-margin\"><b>Can I add in other activities?</b></p>\n<p class=\"no-margin\">Not at this time. If this is a feature you would like, please send us a message.</p>

When I push that back up, it adds a new line to below the bolded text. This is also happening above lists as well, but only when it’s below a <p> class.

The output looks like this:

<b>Can I add in other activities?<b/>

Not at this time. If this is a feature you would like, please send us a message.

Where the intended output should be

<b>Can I add in other activities?</b>
Not at this time. If this is a feature you would like, please send us a message.

Is this a bug? Is there a way around this?

Best answer by Emilygav

Hey ​@Cody Iddings! Emily here from Support Engineering at Intercom 👋🏼

I just tested this myself and upon testing I could not replicate the same issue you are experiencing. What version of the API are you testing this with? Could you try using the latest version?

I used the example body you gave in your message:


Then the output of the article was as follows:


There is no gaps in between the sentences - expected behaviour. 

Maybe I am understanding you incorrectly? If so, could you give more clear instructions so I can replicate your issue on my side? Thanks!

View original
Did this topic help you find an answer to your question?

5 replies

Emilygav
Intercom Team
Forum|alt.badge.img+3
  • Intercom Team
  • 75 replies
  • Answer
  • December 18, 2024

Hey ​@Cody Iddings! Emily here from Support Engineering at Intercom 👋🏼

I just tested this myself and upon testing I could not replicate the same issue you are experiencing. What version of the API are you testing this with? Could you try using the latest version?

I used the example body you gave in your message:


Then the output of the article was as follows:


There is no gaps in between the sentences - expected behaviour. 

Maybe I am understanding you incorrectly? If so, could you give more clear instructions so I can replicate your issue on my side? Thanks!


  • Author
  • New Participant
  • 2 replies
  • December 18, 2024

Hi Emily, I wasn’t designating a version, and now it’s working as expected when I use 2.11 of the API. Thank you!


Emilygav
Intercom Team
Forum|alt.badge.img+3
  • Intercom Team
  • 75 replies
  • December 18, 2024

Glad to hear ​@Cody Iddings! 🙌🏼


  • Author
  • New Participant
  • 2 replies
  • December 18, 2024

Actually ​@Emilygav  now the spaces are getting stripped above the Heading Tags. Any recommendations to ensure empty spaces don’t get stripped by the API?


Shaq Payne
Intercom Team
Forum|alt.badge.img+2
  • Intercom Team
  • 27 replies
  • December 29, 2024

Hey ​@Cody Iddings 👋 

Are you only seeing this behavior above headline tags?  Can you send me a code example? 
 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings