On 18 March 2016 at 03:28, Sam Ruby <ru...@intertwingly.net> wrote: > On Thu, Mar 17, 2016 at 4:19 PM, sebb <seb...@gmail.com> wrote: >> The Wunderbar docs mention outputting text with markup: >> >> _{"<em>hello</em>!!!"} >> >> The following also works: >> >> _{"<!-- fixed comment -->"} >> >> However it does not seem to be possible to output an HTML comment >> which contains any variable text, e.g. a date. >> >> Is this possible? > > The indirect way (which I don't recommend): > > _{"<!-- fixed comment with #{date} -->"} > > What that does internally is run an HTML parser on the string, extract > nodes, and do the equivalent of the following, which you can do > directly:
That presumably explains the need for nokogiri. And perhaps the need to untaint. But I would expect wunderbar to include nokogiri itself or report an error if not available? Seems odd that the behaviour silently changes depending on what happens to be included somewhere in the app. > _.comment! "fixed comment with #{date}" I see. Perhaps that could be documented in the README? > - Sam Ruby