return content;
// we have to do the escaping here, because we will ultimately
// write this as a raw string, so as not to escape the tags.
- return "<a href='#LyXCite-" + key + "'>" +
+ return "<a href='#LyXCite-" + html::cleanAttr(key) + "'>" +
html::htmlize(content, XHTMLStream::ESCAPE_ALL) + "</a>";
}
}
-void InsetCitation::addToToc(DocIterator const & cpit) const
+void InsetCitation::addToToc(DocIterator const & cpit, bool output_active) const
{
// NOTE
// XHTML output uses the TOC to collect the citations
// will need to change how the citations are collected.
docstring const tocitem = getParam("key");
Toc & toc = buffer().tocBackend().toc("citation");
- toc.push_back(TocItem(cpit, 0, tocitem));
+ toc.push_back(TocItem(cpit, 0, tocitem, output_active));
}
-int InsetCitation::plaintext(odocstream & os, OutputParams const &) const
+int InsetCitation::plaintext(odocstringstream & os,
+ OutputParams const &, size_t) const
{
string const & cmd = getCmdName();
if (cmd == "nocite")
void InsetCitation::toString(odocstream & os) const
{
- plaintext(os, OutputParams(0));
+ odocstringstream ods;
+ plaintext(ods, OutputParams(0));
+ os << ods.str();
}