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

Invalid MathML markup not throwing an error #835

Closed
pkra opened this issue Mar 8, 2018 · 6 comments
Closed

Invalid MathML markup not throwing an error #835

pkra opened this issue Mar 8, 2018 · 6 comments
Labels
status: has PR The issue is being processed in a pull request type: bug The issue describes a bug

Comments

@pkra
Copy link
Member

pkra commented Mar 8, 2018

Nested math tags should throw an error as they are not valid.

@tofi86 tofi86 added type: bug The issue describes a bug status: needs review Needs to be reviewed by a team member before further processing labels Apr 20, 2018
@gegunov
Copy link

gegunov commented Jun 29, 2018

I tried to reproduce it several times and every time there was an error, hence all works as expected.

@pkra
Copy link
Member Author

pkra commented Jun 29, 2018

I tried to reproduce it several times and every time there was an error, hence all works as expected.

Argh, I can't reproduce this in an isolated minimal example and of course I fixed the sample where I ran into this and don't recall which of the expressions caused the issue.

Sigh.

Sorry for the noise. I'll re-open if I run into this again.

@pkra pkra closed this as completed Jun 29, 2018
@pkra
Copy link
Member Author

pkra commented Jun 29, 2018

Got it. The problem is inside epub-switch elements.

Something like

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
  <title>nested math tags should be invalid</title>
</head>

<body>
 <h1>nested math tags should be invalid even inside epub switch</h1>
 <epub:switch>
   <epub:case required-namespace="http://www.w3.org/1998/Math/MathML">
    <math alttext="placeholder" display="block" overflow="scroll" xmlns="http://www.w3.org/1998/Math/MathML">
      <math alttext="a"><mn>11</mn>
       <mo>,</mo>
       <mo>−</mo>
       <mn>3</mn>
       <mo>,</mo>
       <mn>5</mn>
      </math>
    </math>
   </epub:case>
  <epub:default>
 <img src="../Images/Image0001.svg" alt=""/></epub:default>
</epub:switch>
</body>
</html>

With 4.0.2, this gets validated without errors.

Sample nested-math-tags.zip (change extension to epub).

@pkra pkra reopened this Jun 29, 2018
@pkra
Copy link
Member Author

pkra commented Jun 29, 2018

I didn't test master so this may be fixed already.

@rkwright
Copy link

Tested against epubcheck 4.0.3 built from master. No errors.

@rkwright rkwright changed the title Invalid markup not throwing an error Invalid MathML markup not throwing an error Sep 11, 2018
@tofi86 tofi86 added status: ready for implem The issue is ready to be implemented and removed status: needs review Needs to be reviewed by a team member before further processing labels Sep 11, 2018
@rdeltour rdeltour added status: has PR The issue is being processed in a pull request and removed status: ready for implem The issue is ready to be implemented labels Jan 12, 2019
rdeltour added a commit that referenced this issue Jan 12, 2019
rdeltour added a commit that referenced this issue Jan 12, 2019
rdeltour added a commit that referenced this issue Jan 12, 2019
rdeltour added a commit that referenced this issue Jan 12, 2019
@rdeltour
Copy link
Member

Done in #934

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: has PR The issue is being processed in a pull request type: bug The issue describes a bug
Projects
None yet
Development

No branches or pull requests

5 participants