Missed Team ’24? Catch up on announcements here.

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

How can I send a raw HTML message without HipChat "fixing" it?

Deleted user June 8, 2018

We have a URL "protocol" we handle using internal applications. Call it "asdf". E.g.:

asdf://item/orange

This produces:

<a target="_blank" rel="noopener noreferrer" href="asdf://item/orange">asdf:<wbr>/<wbr>/item<wbr>/orange</a> 

If we send the above text as a "text" message via the HipChat API v2, it is correctly identified and converted to a valid, clickable link.

However, if we send it as an "html" message, it is corrupted in any of several ways, depending on how it's sent, but the only one I really EXPECT to work is sending the anchor tag explicitly:

With a payload of:

{"message_format":"html","message":"<a href=\"asdf://item/orange\">topic</a>"}

The result is:

<a xmlns="http://www.w3.org/1999/xhtml">topic</a>

According to the API v2 documentation, this should work: 

html - Message is rendered as HTML and receives no special treatment. Must be valid HTML and entities must be escaped (e.g.: '&amp;' instead of '&'). May contain basic tags: a, b, i, strong, em, br, img, pre, code, lists, tables.

But it looks like I'm falling victim to this API footnote:

Invalid HTML tags and attributes will be automatically removed.

How can I keep HipChat from thinking it's smarter than me, especially since the URL-ification works correctly for text messages?

1 answer

0 votes
Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 7, 2021

I think it's obsolete request :(
Because the products Hipchat and Stride are not used anymore. 
So sad to find questions without replies.   
Sorry for the inconvenience.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events