eea / odfpy

API for OpenDocument in Python
GNU General Public License v2.0
308 stars 63 forks source link

Text:span elements with a space character are treated as self-closed elements #63

Open rtclay opened 6 years ago

rtclay commented 6 years ago

A text span with a space character as content is erroneously treated as a self-closed element without any text. I'm not sure where the problem lies.

This xml in a odf file's content.xml file: <text:span text:style-name="T1"> </text:span>

Becomes this xml after going through the functions load and toXml: <text:span text:style-name="T1"/>

I've described the problem more fully at this stack exchange question.

https://stackoverflow.com/q/46049584/621604