Quote:
Originally Posted by HarryT
Why on Earth would anyone want to change the readable into the meaningless #160? What's the benefit?
|
It wasn't really a case of "want." There's been lots of previous discussion about the reasons, Harry, but the short answer is that: quirks of Qt and the various Sigil libraries/features that require xhtml to remain well-formed at all times actually conspired to
create invalid xhtml under certain conditions.
The benefit is that source documents that contain the unicode non-breaking-space
character (which won't survive in the Qt editing widget) can be opened/imported without breaking the well-formed "rules" (which is what was happening when non-breaking-space characters were being converted to the nbsp entity in documents with no Document Type Declaration).
I agree it's probably not optimal, but without a major overhaul of Sigil's codebase/structure (which doesn't seem likely at this point), using #160 rather than nbsp was simply the quickest band-aid for a hairy problem.