]> git.lyx.org Git - features.git/commitdiff
We need to clean the HTML id before writing it.
authorRichard Heck <rgheck@lyx.org>
Mon, 14 May 2012 12:29:17 +0000 (08:29 -0400)
committerRichard Heck <rgheck@lyx.org>
Mon, 14 May 2012 12:30:04 +0000 (08:30 -0400)
src/insets/InsetBibitem.cpp
src/insets/InsetBibtex.cpp

index 3b77c8e0a5938bd424f5562ec0e29f5ffdb3029f..6decdce7f4e174da2f075768ac3bdb586e1637d2 100644 (file)
@@ -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();
index 21e5f774adcd1eb013580b595e8152450ebf8652..8f33a2de3c37ca2c2c1501cc7028aaedac1b0c11 100644 (file)
@@ -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)