]> git.lyx.org Git - features.git/commitdiff
Fix bug reported on user list: <title> not escaped.
authorRichard Heck <rgheck@comcast.net>
Wed, 2 Nov 2011 18:57:14 +0000 (18:57 +0000)
committerRichard Heck <rgheck@comcast.net>
Wed, 2 Nov 2011 18:57:14 +0000 (18:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@40132 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp
status.20x

index 79b8ebd1efe3283c12dd24e9b125afdf529e7540..4b86241ab53b0e2c063f7bd701daeca7d269992b 100644 (file)
@@ -1657,7 +1657,9 @@ void Buffer::writeLyXHTMLSource(odocstream & os,
 
                docstring const & doctitle = features.htmlTitle();
                os << "<title>"
-                  << (doctitle.empty() ? from_ascii("LyX Document") : doctitle)
+                  << (doctitle.empty() ? 
+                        from_ascii("LyX Document") : 
+                        html::htmlize(doctitle, XHTMLStream::ESCAPE_ALL))
                   << "</title>\n";
 
                os << "\n<!-- Text Class Preamble -->\n"
index 2880344d68c13ab18a1159fada7ef40a864449a9..d31a51f9a8d7f6c3dc49b8860f1db11d4eceed3a 100644 (file)
@@ -162,6 +162,8 @@ What's new
 - Fix latex export of multilingual documents containing theorem-like
   environments (bug 7800).
 
+- Escape ampersands in <title> when outputting XHTML.
+
 
 * USER INTERFACE