[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sax/source
Eike Rathke
erack at redhat.com
Fri Jun 16 22:46:37 UTC 2017
sax/source/tools/fastserializer.cxx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit f540a8031e84e9da7fc9aa08522360dbb365b035
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
(cherry picked from commit c5bc40ae6cabe240700773df5cc7f010acce6014)
Reviewed-on: https://gerrit.libreoffice.org/38899
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins <ci at libreoffice.org>
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