-
-
Notifications
You must be signed in to change notification settings - Fork 347
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug description
FB2 format is XML-based. XML allows comments (<!-- ... -->
), which should be ignored, but Foliate shows them as book content. Here is an example:
<?xml version="1.0" encoding="UTF-8"?>
<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink">
<body>
<title>
<!-- This is a comment. Foliate should *not* display it. -->
<p>Author</p>
<p>Book Title</p>
</title>
<section>
<title>
<p>Chaper One</p>
</title>
<p>Lorem ipsum.</p>
</section>
</body>
</FictionBook>
Note line 5: <!-- This is a comment. Foliate should *not* display it. -->
. It is a comment, not a part of book text. It is expected comments are not displayed to book readers, but Foliate displays them. Moreover, Foliate strips <!--
and -->
, so comments are presented to the user as normal book content.
To Reproduce
- Download the attachment: example.fb2.zip (It is a copy of the example above, zipped because github does not allow to upload *.fb2 files.)
- Start Foliate.
- Open the downloaded
example.fb2.zip
file. - Look the the book text. It starts with "This is a comment. Foliate should not display it."
Expected behavior
Text "This is a comment. Foliate should *not* display it." is not displayed.
Screenshots
Text "This is a comment. Foliate should *not* display it." should not be displayed.
Version:
- Foliate version: 2.6.4
- OS/Distribution and version: Fedora 36
- Desktop environment: GNOME 42
- Installation method: RPM (foliate-2.6.4-2.fc36.noarch)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working