https://bugs.freedesktop.org/show_bug.cgi?id=63053

          Priority: medium
            Bug ID: 63053
          Assignee: [email protected]
           Summary: FILESAVE, FILEOPEN: ampersand in document title causes
                    corrupt docx when saving; truncates title when loading
          Severity: normal
    Classification: Unclassified
                OS: Mac OS X (All)
          Reporter: [email protected]
          Hardware: x86-64 (AMD64)
            Status: UNCONFIRMED
           Version: 4.0.1.2 release
         Component: Writer
           Product: LibreOffice

Two related problems with docx files, which both seem to arise from LO putting
and expecting raw ampersands, rather than & entities, in the docx file's
docProps/core.xml file.


Steps to reproduce the FILESAVE problem:

1. Create new, empty writer document.
2. Set the document title (File->Properties->Description->Title) to a value
containing an ampersand, e.g. "Title & more"
3. Save as Microsoft Word 2007/2010 XML (.docx).
4. Attempt to load in Microsoft Word 2010.

Expected result:

Document loads successfully.

Actual result:

"The file ... cannot be opened because there are problems with the contents",
and and offer to recover.

Contents of the relevant field in docProps/core.xml:

<dc:title>Title & more</dc:title>


Steps to reproduce the FILELOAD problem:

1. Create a new, empty document in Microsoft Word 2010.
2. Set the document title to a value containing an ampersand.
3. Save in Microsoft Word's native docx format.
4. Load in LO.

Expected result:

Loads with title set correctly.

Actual result:

File loads normally, but the title is truncated, but all of the title up to and
including the ampersand is lost -- in the above example, the title would appear
as " and more".

Contents of the relevant field in docProps/core.xml:

<dc:title>Title &amp; more</dc:title>


These issues are easily worked around by avoiding using ampersands in document
titles. However it is probably worth investigating in case there are some
other, more serious situations in which we are generating invalid XML, or
failing to parse XML correctly, for the same underlying reason.

I have not yet checked whether the same issue arises with XLSX and PPTX files,
or with other metadata fields.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to