[Libreoffice-commits] core.git: sax/source
Eike Rathke
erack at redhat.com
Fri Jun 16 21:19:13 UTC 2017
sax/source/tools/fastserializer.cxx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit c5bc40ae6cabe240700773df5cc7f010acce6014
Author: Eike Rathke <erack at redhat.com>
Date: Fri Jun 16 23:17:54 2017 +0200
Literal tab character is bad XML, write ' ' instead
Additionally, it *may* have caused document corruption when loading such an
.xlsx file, though a small test case with an embedded literal tab character
could not reproduce the behaviour.
See
https://ask.libreoffice.org/en/question/100615/sudden-corruption-of-xlsx-file-bug/
and note that the literal tab character is a mere assumption, but it would be
possible.
Change-Id: Ia9d33955f1196222d335a1a4807fba78df4e4d85
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx
index 1424d1e73538..ff74fe3b7079 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -150,8 +150,8 @@ namespace sax_fastparser {
case '&': writeBytes( "&", 5 ); break;
case '\'': writeBytes( "'", 6 ); break;
case '"': writeBytes( """, 6 ); break;
-#if 0
case '\t':
+#if 0
// Seems OOXML prefers the _xHHHH_ escape over the
// entity in *some* cases, apparently in attribute
// values but not in element data.
@@ -163,13 +163,11 @@ namespace sax_fastparser {
writeBytes( bufXescape, kXescapeLen);
}
else
+#endif
{
- // We did never write this, but literal tab
- // instead. Should we?
writeBytes( " ", 4 );
}
break;
-#endif
case '\n':
#if 0
if (mbXescape)
More information about the Libreoffice-commits
mailing list