knipknap
knipknap

Reputation: 6184

In an Odoo 16 QWeb template, the content of <link> tag is added after the tag, not within

I am seeing some strange behavior in an Odoo 16 QWeb template. Given the following template:

<channel>
  <item>
    <link>test</link>
  </item>
</channel>

Template

This produces the following output:

<channel>
  <item>
    <link/>test
  </item>
</channel>

Note that the content of the tag is added after the tag, not within. By simply renaming "link" to "url" (or any other string), the problem goes away.

Any idea how to fix that?

Upvotes: 1

Views: 120

Answers (1)

Kevin
Kevin

Reputation: 152

See the link tag for HTML, it isn't supposed to take child elements. If this is a custom component, this probably won't work as it's a reserved HTML tag.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link

Upvotes: 0

Related Questions