From 5d9bfe9cccd9e1b3d127bc862cbfd0b2ee759bac Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 14 Nov 2009 14:16:15 +0000 Subject: [PATCH] HTML escaping for docstrings. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31977 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/output_xhtml.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp index eef25c318e..b6e1db4d72 100644 --- a/src/output_xhtml.cpp +++ b/src/output_xhtml.cpp @@ -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. -- 2.39.2