XF 2.2 Sending special characters over API

kolakube

Well-known member
Trying to workout this small detail when creating new conversations over the API.

I am sending this exact text over POST as the conversation title:

You're in!

...but it renders as:

You&#039re; in!

Screen Shot 2020-10-05 at 7.31.48 PM.webp

Which format does this text need to be sent in to render special characters on the forum properly?
 
Did you ever figure this out? I'm facing the same issue.

EDIT: Never mind, figured it out. I just wasn't properly decoding the string before sending it over in the curl request. Using html_entity_decode() worked:

PHP:
$message = html_entity_decode( $message );
 
Last edited:
Top Bottom