Skip to content

Incomplete parsing on bad attribute data #636

@Frenzie

Description

@Frenzie

To reproduce:

Take a user guide that has a stray quotation mark:

<img loading="lazy" src="https://hosted.weblate.org/widget/koreader/user-guide/multi-auto.svg" alt="Translation status"" style="width:60%;">

Run something like:

pandoc user_guide/en.html --resource-path=.:user_guide:user_guide/pictures --metadata title="KOReader User Guide" --toc --toc-depth=3 -o koreader_user_guide.epub

And voila, this nonsense:

<img src="../media/file1.svgz" style="width:60%;" loading="lazy" data-"="" alt="Translation status" />

Parsing stops after that.

Now this is probably more of a Pandoc bug and obviously an issue with the original HTML as well, but the reason I'm writing it down is that it's merrily ignored by at least some other apps.

koreader_user_guide.zip

I don't think it's a bug, but occasionally you still want to act on these kinds of things. :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions