When posting to the
/post end point to create a post (a little redundant I know), if the
raw parameter contains an ‘&’, the body of the created post will contain everything up to that ‘&’ but won’t include the ‘&’ or anything after it. For example:
curl -X POST -d topic_id=topic_id -d raw="This is a test post with an ampersand & nothing after the ampersand will show up in the post" http://discourse.example.com/posts?api_key=api_key&api_username=api_username
The post is still created, so I imagine there is something bugged out on the /post endpoint? I tried changing ‘&’ to something html-safe like ‘&’ but the post body ends no matter what at the ‘&’.
EDIT: To add some more context, if I pass along a raw parameter such as:
-d raw="This is a test post with an ampersand \\& does it work"
The response contains:
"cooked":"\u003cp\u003eThis is a test post with an ampersand \\\u003c/p\u003e"