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

foliavalidator doesn't preserve CDATA ? #21

Open
kosloot opened this issue Feb 27, 2020 · 2 comments
Open

foliavalidator doesn't preserve CDATA ? #21

kosloot opened this issue Feb 27, 2020 · 2 comments
Assignees

Comments

@kosloot
Copy link
Collaborator

kosloot commented Feb 27, 2020

when running foliavalidator examples/gaps.2.0.0.folia.xml -o
the CDATA block in the <content> is discarded.

IN:

     <gap class="frontmatter">
        <desc>This is the cover of the book</desc>
        <content>
<![CDATA[

            SHOW WHITE AND THE SEVEN DWARFS


                by the Brothers Grimm

                    first edition


            Copyright(c) blah blah
]]>
        </content>
     </gap>

OUT

    <gap class="frontmatter">
      <desc>This is the cover of the book</desc>
      <content>


            SHOW WHITE AND THE SEVEN DWARFS


                by the Brothers Grimm

                    first edition


            Copyright(c) blah blah

        </content>
    </gap>

This might not be a real bug, but is quite surprising.

@proycon proycon self-assigned this Feb 27, 2020
@proycon proycon transferred this issue from proycon/foliatools Mar 8, 2020
@proycon
Copy link
Owner

proycon commented Mar 8, 2020

This is a good point yes and something to investigate. If I recall correctly I have rather limited CDATA support, there could be situations where this becomes a problem.

@proycon
Copy link
Owner

proycon commented Mar 9, 2021

In the lxml binding, there is this paramter which is enabled by default and causes this behaviour:

  • strip_cdata - replace CDATA sections by normal text content (on by default)

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

No branches or pull requests

2 participants