Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

how to upload a txt file having specific charaters like "&" to confluence page?

angie March 17, 2016

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.

 

2 answers

0 votes
angie March 18, 2016

thanks alot, with String replace, its working fine now.  Thanks again

0 votes
Aleks Yenin (Polontech)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 17, 2016

Try to replace all & with 

&

inside your text file

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events