HTML tag allowed?

Hi,

My tests reveal that only some html tag are accepted inside tag notes for example (ol, li…) but others completely break the API like

for example.

Is it expected behavior? Couldn’t you just ignore them instead of let it break the call? If this is intended, can we have a list of allowed tags?

Thanks a lot

If you take a look at the preview doc we got for Rich Text it shows:

...restricted to the following tags:
<body>
<strong>
<em>
<u>
<code>
<ol>
<ul>
<li>
<a>

I think that’s probably the list you’re looking for.

As to your question about why other tags are not just ignored, that’s a good question!

And \n for new lines

Great thanks. So my remaining point is: should it really break everything when not using one of these tags?

I’m not sure if it breaks or post the notes as plain text

Rather than silently changing your data by stripping out unsupported tags or escaping them into regular text, the API will reject tags that have no equivalent in the Asana web product. We currently support the following tags:

  • <a>
  • <ol>
  • <ul>
  • <li>
  • <strong>
  • <em>
  • <code>
  • <u>

Didn’t you forget <b> and <i> maybe?

<b> is <strong>
and
<i> is <em>

Ok about the visual result being the same, but my question remains if they are still accepted by the parser :slight_smile:

Ah, good question!

1 Like

In the same spirit of “we won’t silently change your data” the API will not silently translate <b> and <i> tags to <strong> and <em>.

That assumes it’s our data rather than data from the web, which is a very messy place. html parsers are traditionally very forgiving, it seems strange and inconvenient that this one isn’t.

1 Like

how to add newline

Use \n