Sigil-Ebook / Sigil

Sigil is a multi-platform EPUB ebook editor
GNU General Public License v3.0
5.97k stars 578 forks source link

[Bug]: Reformatting of html converts small non-breaking space #745

Closed plastikschnitzer closed 8 months ago

plastikschnitzer commented 8 months ago

Bug Description

Steps to reproduce:

put a narrow non-breaking space into the code with   go to tools -> reformat and clean html see conversion of narrow non-breaking spaces to a character that just shows an underscore

Expected behavior:

Narrow non breaking space should be untouched like normal non-breaking space

Platform (OS)

Linux

OS Version / Specifics

Ubuntu 22.04

What version of Sigil are you using?

1.9.2

Any backtraces or crash reports

No response

dougmassay commented 8 months ago

You'll find a setting in Sigil Preferences call Preserve Entities where you'll need to add the list of entities you want to preserve. Note, however, that the narrow non-breaking space entity is currently being converted to a narrow non-breaking space character.

dougmassay commented 8 months ago

The underscore is to let you know that there's a special invisible character there. In this case, a narrow non-breaking space character.

This is not a bug. Sigil is operating as expected. Protect the entities you wish to preserve (as entities) by adding them to the Preserve Entities list in preferences.