Skip to main content
Question

Zap from Salesforce to Confluence failing because of special characters

  • July 28, 2023
  • 1 reply
  • 175 views

MMonteyne

I am taking text from a Salesforce Task and sending it to Confluence as a new page. Working like a charm. However, in one of our notes, there is an "&" and it is causing this error.

com.atlassian.confluence.api.service.exceptions.BadRequestException: Error parsing xhtml: Unexpected character ' ' (code 32) (missing name?)

Yet I can take the same text and paste it directly into a confluence page without issue.  I am sure special characters are going to occur occasionally in our teams Salesforce notes.

Suggestions?

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

GetUWired
Forum|alt.badge.img+12
  • Zapier Solution Partner
  • August 2, 2023

Hey @MMonteyne

I actually ran into a similar issue recently where the “&” was causing some issues. 

For me, the fields with & were being used as query parameters in the API call.  Since & is a special character that separates query variables, I was getting a similar error.

I was able to fix it by changing the “&” characters into “%26” in the code.

 

For you, I would add a step where you would replace all instances of & with “%26” or just “and” to potentially fix this.

 

Hope this helps!