Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improves opds validation #488

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cbckly
Copy link

@cbckly cbckly commented Oct 14, 2020

HTML should not be written into the XML stream as they are both tag based languages. Depending on the complexity of the rich text in Calibre that populates the content field, this can stop validation and break some readers. Notably PocketReader on Android which will not process an invalid OPDS.

4.1.3.3.  Processing Model
   2.  If the value of "type" is "html", the content of atom:content
       MUST NOT contain child elements and SHOULD be suitable for
       handling as HTML [HTML].  The HTML markup MUST be escaped; for
       example, "<br>" as "&lt;br>".  The HTML markup SHOULD be such
       that it could validly appear directly within an HTML <DIV>
       element.  Atom Processors that display the content MAY use the
       markup to aid in displaying it.

HTML should not be written into the XML stream as they are both tag based languages.  Depending on the complexity of the rich text in Calibre that populates the content field, this can stop validation and break some readers.  Notable PocketReader on Android which will not process an invalid OPDS.

4.1.3.3.  Processing Model
   2.  If the value of "type" is "html", the content of atom:content
       MUST NOT contain child elements and SHOULD be suitable for
       handling as HTML [HTML].  The HTML markup MUST be escaped; for
       example, "<br>" as "&lt;br>".  The HTML markup SHOULD be such
       that it could validly appear directly within an HTML <DIV>
       element.  Atom Processors that display the content MAY use the
       markup to aid in displaying it.
mikespub added a commit to mikespub-org/seblucas-cops that referenced this pull request Aug 4, 2023
@mikespub
Copy link

Included in release 1.4.2 at https://github.com/mikespub-org/seblucas-cops

dunxd pushed a commit to dunxd/mikespub-cops that referenced this pull request Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants