]> git.lyx.org Git - features.git/commitdiff
HTML escaping for docstrings.
authorRichard Heck <rgheck@comcast.net>
Sat, 14 Nov 2009 14:16:15 +0000 (14:16 +0000)
committerRichard Heck <rgheck@comcast.net>
Sat, 14 Nov 2009 14:16:15 +0000 (14:16 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31977 a592a061-630c-0410-9148-cb99ea01b6c8

src/output_xhtml.cpp

index eef25c318e1ae0ebb29252303262f0a7851cfd08..b6e1db4d7282d794658ecd9a4978f049c26e28ef 100644 (file)
@@ -65,9 +65,14 @@ docstring escapeChar(char_type c)
 }
 
 
-// FIXME do something here.
+// escape what needs escaping
 docstring htmlize(docstring const & str) {
-       return str;
+       odocstringstream d;
+       docstring::const_iterator it = str.begin();
+       docstring::const_iterator en = str.end();
+       for (; it != en; ++it)
+               d << escapeChar(*it);
+       return d.str();
 }
 
 // FIXME This needs to be protected somehow.