Can Doxygen escape HTML tags?

doxygen, html

Solution

You could also have used:

/// This function skips all \<li\> elements

Or (if `MARKDOWN_SUPPORT=YES`) write:

/// This function skips all `<li>` elements

which are both reasonably readable, or put everything in a `\verbatim..\endverbatim` section, but then it is also rendered as such.

You could also define an an alias, i.e.

ALIASES = verb{1}="\<\1\>"

And then write

/// This function skips all \verb{li} elements

Problem

I want to include a literal HTML element in a Doxygen comment. Something like this: ``` /// This function skips all <li> elements ``` If I write it like that, the `<li>` is passed to the HTML output, which is obviously not what I want. Instead, I can write this: ``` /// This function skips all &lt;li&gt; elements ``` This works fine in the HTML generated by Doxygen, but now the comment in the source code itself is rather illegible. So it looks like I have to choose between legibility in the generated documentation or in the source code. Is that really the case, or is there a way to force Doxygen to automatically turn all `<blabla>` into `&lt;blabla&gt;`?

Original source