The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit d89158df2aaf584f0077a72a755ed54d0ce975db
Author: Richard Heck <rgh...@lyx.org>
Date:   Mon May 14 08:29:17 2012 -0400

    We need to clean the HTML id before writing it.

diff --git a/src/insets/InsetBibitem.cpp b/src/insets/InsetBibitem.cpp
index 3b77c8e..6decdce 100644
--- a/src/insets/InsetBibitem.cpp
+++ b/src/insets/InsetBibitem.cpp
@@ -351,7 +351,8 @@ 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='LyXCite-" + to_utf8(getParam("key")) + "'";
+       string const attrs = 
+               "id='LyXCite-" + to_utf8(html::cleanAttr(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 21e5f77..8f33a2d 100644
--- a/src/insets/InsetBibtex.cpp
+++ b/src/insets/InsetBibtex.cpp
@@ -960,7 +960,8 @@ 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='LyXCite-" + to_utf8(entry.key()) + "'";
+               string const attr = 
+                       "id='LyXCite-" + to_utf8(html::cleanAttr(entry.key())) 
+ "'";
                xs << html::CompTag("a", attr);
                docstring citekey;
                if (numbers)

-----------------------------------------------------------------------

Summary of changes:
 src/insets/InsetBibitem.cpp |    3 ++-
 src/insets/InsetBibtex.cpp  |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to