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

Bitbucket renders raw html

latest-release January 26, 2020

Am using the API to post issue comments, but supprised that bitbucket does not parse the html it just renders and posted like the picture below show

 

Screenshot_2020-01-27 latest-release projectdjangocms issues #3 - Major updates with Teams for Aquariumes — Bitbucket.png

What is wrong?

Here is my api

content = {"content":{"raw":comment, 'html':comment}
return self._post('2.0/repositories/{0}/issues/{1}/comments/'.format(self.ticket.bitbucket.repo_full_name, self.ticket.bitbucket_issue_id), 
data=self.data, params=params)

1 answer

1 accepted

0 votes
Answer accepted
Tyler T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 27, 2020

Currently, the API will only accept content.raw when posting a comment. HTML is included in the response.

sam March 3, 2020

Doe that mean if I sent <b>this is test</b> when I go to the bitbucket interface I should view the comment as a bold text. For my case it doesn't render as html, instead I get the comment as the original raw html. 

Tyler T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 3, 2020

No, the API only accepts content.raw when POSTing.

However, if you are using the web interface to add comments and then GET them using the API, you can retrieve an HTML version of the comment.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events