Which css attributes are allowed in a Hip Chat notification ?

Christophe Promé July 28, 2015

Hello,

I send notification to a Hip Chat room using the REST API.

Everything works well, however some css attributes in my html are removed :

 

<img style="width:50px; padding-right: 15px;" src="http://url/to/image.png"/>

the width attribute is kept, but padding-right is removed.

It is annoying as I can't get the exact layout I want.

 

Is there a white list of css attributes that can be used in a notification ?

Could you point me to the relevant document ?

 

Thanks

Christophe

1 answer

1 accepted

3 votes
Answer accepted
Jeison
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 29, 2015

Hi Christophe,

We currently accept the following basic CSS attributes for HTML messages sent via the API:

'font-weight',
'color',
'text-decoration',
'height',
'width'

Our API docs only state the accepted HMTL tags, but we do have plans to include additional info on styling soon -https://www.hipchat.com/docs/apiv2/method/send_room_notification

Cheers!

Jeison

Christophe Promé July 29, 2015

Thanks for your answer Jeison. It might be a good idea to add this information to the documentation :-) Cheers

Bob Swift OSS (Bob Swift Atlassian Apps)
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.
November 29, 2016

I was disappointed when none of my embedded styles had no affect. Simple align right for instance. It is now 1.5 years later, when is "soon"?

Lucio Mollinedo June 30, 2017

Same here. I can't believe it's june 2017 and a simple "text-align"="right" won't work..

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events