The branch, 2.0.x, has been updated. - Log -----------------------------------------------------------------
commit 3192dc16a91d07d0b19cfd67fe1d66a6cb4f1ff8 Author: Richard Heck <[email protected]> Date: Sun May 13 13:49:24 2012 -0400 Fix bug #8156. 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 207d7e4ada31d521b75e9290575b97b6bb1e8c38) diff --git a/src/insets/InsetBibitem.cpp b/src/insets/InsetBibitem.cpp index d3a10ae..5fe5e10 100644 --- a/src/insets/InsetBibitem.cpp +++ b/src/insets/InsetBibitem.cpp @@ -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(); diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp index 294ea93..0e80857 100644 --- a/src/insets/InsetBibtex.cpp +++ b/src/insets/InsetBibtex.cpp @@ -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) ----------------------------------------------------------------------- Summary of changes: src/insets/InsetBibitem.cpp | 2 +- src/insets/InsetBibtex.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- The LyX Source Repository
