The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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.

TAGS
AUG Leaders

Atlassian Community Events