i have a .txt file where a line contain an characters "&", when i invoke "HttpPost pageRequest = new HttpPost(pageUrl)" to do java rest API call to update the .txt file to the page, it throws error as: {"statusCode":400,"data":{"authorized":false,"valid":true,"errors":[]},"message":"Error parsing xhtml"} and i can't upload the .txt file to the confluence page, but if i removed the "&" it works fine.
Since confluence page content needs Storage Format, how can i change it to Storage Format in order pass the HttpPost? Thanks alot.