We want the key as id, not the label (which is optional).
We also need a kind of namespace for the citation ids.
We should also clean the id tag before using it.

(cherry picked from commit 207d7e4ada)
This commit is contained in:
Richard Heck 2012-05-13 13:49:24 -04:00
parent 30219ffc37
commit 3192dc16a9
2 changed files with 2 additions and 2 deletions

View File

@ -348,7 +348,7 @@ docstring InsetBibitem::xhtml(XHTMLStream & xs, OutputParams const &) const
// need to use "name" anyway, eventually, because some browsers do not
// handle jumping to ids. If we don't do that, though, we can just put the
// id into the span tag.
string const attrs = "id='" + to_utf8(getParam("label")) + "'";
string const attrs = "id='LyXCite-" + to_utf8(getParam("key")) + "'";
xs << html::CompTag("a", attrs);
xs << html::StartTag("span", "class='bibitemlabel'");
xs << bibLabel();

View File

@ -952,7 +952,7 @@ docstring InsetBibtex::xhtml(XHTMLStream & xs, OutputParams const &) const
xs << html::StartTag("div", "class='bibtexentry'");
// FIXME XHTML
// The same name/id problem we have elsewhere.
string const attr = "id='" + to_utf8(entry.key()) + "'";
string const attr = "id='LyXCite-" + to_utf8(entry.key()) + "'";
xs << html::CompTag("a", attr);
docstring citekey;
if (numbers)