Styling individual words in titles

As mentioned the solution works great.
The titles are also shown with markup when displayed in a table of contents (with the toc-selective-expandable macro). That is not case though when they are obtained by filtering, e.g. [tag[note]] (the filter I use in my Search notes tiddler is more complex, but the complexity would only distract here). The titles, the title fields I presume, are then shown as text without markup. Adding get[caption] ([tag[note]get[caption]]) shows the captions verbatim, i.e., also without markup, e.g. p. 25, <span class="title">@@.small-caps Small caps@@ 2) //Italics//</span>. It would be useful if there is a way to show them with markup in this case as well.