mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 13:48:59 +00:00
Clean id attributes for citations before outputting them.
For some reason, this was done in trunk but never got to branch.
This commit is contained in:
parent
40da79fe73
commit
00e3711c05
@ -956,7 +956,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)
|
||||
|
@ -228,7 +228,7 @@ inline docstring wrapCitation(docstring const & key,
|
||||
return content;
|
||||
// we have to do the escaping here, because we will ultimately
|
||||
// write this as a raw string, so as not to escape the tags.
|
||||
return "<a href='#LyXCite-" + key + "'>" +
|
||||
return "<a href='#LyXCite-" + html::cleanAttr(key) + "'>" +
|
||||
html::htmlize(content, XHTMLStream::ESCAPE_ALL) + "</a>";
|
||||
}
|
||||
|
||||
|
@ -129,6 +129,9 @@ What's new
|
||||
|
||||
- Fix problem with HTML output of simple formulas like "y[i]" (bug 8609).
|
||||
|
||||
- Clean ids for citations before outputting them. Characters like ":" are
|
||||
not allowed in HTML identifiers, apparently (bug 8606).
|
||||
|
||||
|
||||
* USER INTERFACE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user