fb2reader icon indicating copy to clipboard operation
fb2reader copied to clipboard

BOM in the beginning of the file prevents FB2 from being parsed.

Open the-vindicar opened this issue 7 years ago • 2 comments

File examples.zip contains two samples: success.fb2 will be successuly loaded by the extension, and fail.fb2 will not. Snapshot of this behaviour is attached. Since Byte Order Mark can be a valid part of text stream, I suggest that the plugin attempts to accomodate for it's presence. snapshot

the-vindicar avatar Nov 12 '18 19:11 the-vindicar

Remote http:// fail.fb2 file opened without any issue. When saved locally, through, using file:// protocol indeed it fails to be parsed.

The extension relies on Firefox's ability to open local XML files as XML, even when they are not named this way. When the extension was turned off completely, Firefox was able to open success.fb2 as an XML file, but opened fail.fb2 file as a plaintext one.

That opening the file as text/plain instead of text/xml requires rethinking the logic of local file handling.

tymofij avatar Jan 25 '20 08:01 tymofij