mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Fix output of HTML tags in bibliography info.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35388 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
269969db0d
commit
b5d2e9d285
@ -491,7 +491,19 @@ docstring BibTeXInfo::expandFormat(string const & format,
|
||||
}
|
||||
else if (scanning_key)
|
||||
key += char(thischar);
|
||||
else if (richtext || !scanning_rich)
|
||||
else if (richtext) {
|
||||
if (scanning_rich)
|
||||
ret += thischar;
|
||||
else {
|
||||
// we need to escape '<' and '>'
|
||||
if (thischar == '<')
|
||||
ret += "<";
|
||||
else if (thischar == '>')
|
||||
ret += ">";
|
||||
else
|
||||
ret += thischar;
|
||||
}
|
||||
} else if (!scanning_rich /* && !richtext */)
|
||||
ret += thischar;
|
||||
// else the character is discarded, which will happen only if
|
||||
// richtext == false and we are scanning rich text
|
||||
|
@ -173,6 +173,8 @@ public:
|
||||
/// \return formatted BibTeX data associated with a given key.
|
||||
/// Empty if no info exists.
|
||||
/// Note that this will retrieve data from the crossref as needed.
|
||||
/// If \param richtext is true, then it will output any richtext tags
|
||||
/// marked in the citation format and escape < and > elsewhere.
|
||||
docstring const getInfo(docstring const & key, Buffer const & buf,
|
||||
bool richtext = false) const;
|
||||
/// Is this a reference from a bibtex database
|
||||
|
@ -969,6 +969,7 @@ docstring InsetBibtex::xhtml(XHTMLStream & xs, OutputParams const &) const
|
||||
// which will give us all the cross-referenced info. But for every
|
||||
// entry, so there's a lot of repitition. This should be fixed.
|
||||
xs << html::StartTag("span", "class='bibtexinfo'")
|
||||
<< XHTMLStream::NextRaw()
|
||||
<< bibinfo.getInfo(entry.key(), buffer(), true)
|
||||
<< html::EndTag("span")
|
||||
<< html::EndTag("div");
|
||||
|
Loading…
Reference in New Issue
Block a user