[Libreoffice-bugs] [Bug 142443] New: Libre Office Writer breaks the text adding unwanted <span> tags in the content.xml file

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun May 23 09:21:31 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=142443

            Bug ID: 142443
           Summary: Libre Office Writer breaks the text adding unwanted
                    <span> tags in the content.xml file
           Product: LibreOffice
           Version: 6.0 all versions
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: btv2000 at hotmail.com

Description:
This issue is present at least since LO 6.3.6. It happens also with LO7.x. It
is a critical bug when you have to paste the text in the Wordpress
"preformatted blocks" or having to work with HTML! My system runs with Windows
64bit.

The error is not exactly reproducible but it happens always when you write a
text, or changing an existing text, when applying formatting tags as bold
words, or different colors to different words. It happens also when you insert
new text between rows, or modifying existing sentences.

Almost every time, LO adds randomly unwanted <span> tags which break the text
in hundred of lines, each one containing even only a single character. In
documents containing many pages, it is noticeable even in the increasing size
of the .odt file. It rises more than expected, because the content.xml file
gets filled with thousands of unnecessary <span> tags, and maybe also tags
"<style:style style:name"

You see the effect of these tags when you paste the text into a "Preformatted
text" block in Wordpress. The pasted text shows all the line breaks causes by
the <span> tags.
Here a small example of what happens in the content.xml file. The text is
broken in many of mini-rows, filled up with tags "<text:span text..." and
"<style:style style:name=...." example:

<text:span text:style-name="T1">P</text:span>
<text:span text:style-name="T2">rob</text:span>
<text:span text:style-name="T3">a</text:span>
<text:span text:style-name="T2">bly, </text:span>
<text:span text:style-name="T1">collisions with other galaxies have
</text:span>
<text:span text:style-name="T2">already happened to the Milky Way in the past,
in</text:span>
<text:span text:style-name="T1">corporating </text:span>

It is a problem of LibreOffice. I have attached the document "sample3.odt"

HTML look so:

<p align="left"><span style="font-family: Arial, sans-serif;"><span
style="font-size: small;"><a
href="https://en.wikipedia.org/wiki/Andromeda_Galaxy"><b>Andromeda</b></a> is
the galaxy more near to ours, the Milky Way. It is about 2,5 millions of light
years from us (which is a little distance in the scale of universe). Andromeda
is a big Galaxy, bigger that the Milky Way. It has a diameter of 220.000 light
years and contains about <b>1000 billions of stars</b>.</span></span></p>
<p align="left"><span style="font-family: Arial, sans-serif;"><span
style="font-size: small;">In comparison, the Milky Way is 170.000 - 200.000
light years large and contains 100-400 billion stars.</span></span></p>
<p align="left"><span style="font-family: Arial, sans-serif;"><span
style="font-size: small;">The interesting part is that Andromeda is moving
towards us and in about 4,5 billions years Andromeda will collide with the
Milky Way. We can do nothing to stop this way! Collisions among galaxies are a
common event in the universe.</span></span></p>

The attached example has been created with LO 6.x, but it happens also with LO
7.x.

Please provide a feedback about this bug. All the existing .odt files are
messed up with these tags. If possible, a tool to clean the existing documents
would be demanded.

Steps to Reproduce:
See bug description

Actual Results:
Text in content.xml file is broken with many unwanted <span> tags

Expected Results:
Text is not broken with unwanted <span> tags


Reproducible: Always


User Profile Reset: Yes



Additional Info:
I am currently using LO 6.4 but it happens also with LO 7.x
I don't need to update my main LO installation before this bug is fixed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210523/0ab232dc/attachment.htm>


More information about the Libreoffice-bugs mailing list