Bug 72541 - I/O error on opening flat odf file with & in text (error from LibreOffice version 3.4 and up / opening emty in previous versions)
Summary: I/O error on opening flat odf file with & in text (error from LibreOffice ver...
Status: CLOSED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
(See in Summary)
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-09 21:12 UTC by Cor Nouws
Modified: 2013-12-10 15:37 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
test file (29.40 KB, application/vnd.oasis.opendocument.text-flat-xml)
2013-12-09 21:13 UTC, Cor Nouws
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cor Nouws 2013-12-09 21:12:49 UTC
an odtf file containing
     <text:p text:style-name="P6">Client & Teksten</text:p>
gives an general I/O error

Reported in 4.1.3.2

I see the same error in 3.4.6 and up.
In 3.3.3 the file opens, but without content and the command line returns:

 LibO333rc1/libreoffice/basis3.3/share/xslt/odfflatxml/odfflatxmlimport.xsl:
  Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
  Error on line 296 column 41 
  SXXP0003: Error reported by XML parser: The entity name must immediately 
  follow the '&' in the entity reference.
Comment 1 Cor Nouws 2013-12-09 21:13:41 UTC
Created attachment 90536 [details]
test file
Comment 2 Maxim Monastirsky 2013-12-10 07:21:23 UTC
Hi Cor,

The attached XML file is invalid, since '&' considered as an escape character in XML. In order to store a text with '&' one should use '&amp;'. What version of LO did create such files? Can it be reproduced with the latest versions? Otherwise I think we should close this one as NOTABUG.

Note that we already have requests to support invalid Excel XML files (see Bug 38361, Bug 68742). Don't know if it makes sense to request the same for ODF.
Comment 3 Cor Nouws 2013-12-10 13:17:20 UTC
Hi Maxim,

(In reply to comment #2)

> The attached XML file is invalid, since '&' considered as an escape
> character in XML. In order to store a text with '&' one should use '&amp;'.
> What version of LO did create such files? Can it be reproduced with the
> latest versions? Otherwise I think we should close this one as NOTABUG.

Thanks for that explanation.
Looking in 4.2.0, adding an '&' results in 
     <text:span text:style-name="T6">&amp; </text:span>

I expect the file to come from an external tool. Will inform about that later.

> Note that we already have requests to support invalid Excel XML files (see
> Bug 38361, Bug 68742). Don't know if it makes sense to request the same for
> ODF.

Hmm, I would not suggest that.
Comment 4 Cor Nouws 2013-12-10 15:37:07 UTC
Indeed, it's the external tool that pushes a plain '&' in the file.

thanks again Maxim,
Cor
Comment 5 Cor Nouws 2013-12-10 15:37:23 UTC
.