crowdagger / epub-builder

A Rust library for generating EPUB files
Mozilla Public License 2.0
135 stars 45 forks source link

Fix all exotic characters in IDs #21

Closed thebaron88 closed 2 years ago

thebaron88 commented 2 years ago

I have a source document with backslashes in the file name (windows paths). But there are also lots of other characters that would be invalid. I propose replacing all non-alphanumerics with underscores. The full ID rules are quite complex, so this feels like a good middle ground between the current hardcoded replacements and a "proper" ruleset.

thebaron88 commented 2 years ago

Aborted. I realized this would be too restrictive, I'll implement the rules from the W3C Recommendation and do another PR.