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

MathML support need improvements #8

Open
rgaiacs opened this issue Jan 6, 2015 · 0 comments
Open

MathML support need improvements #8

rgaiacs opened this issue Jan 6, 2015 · 0 comments

Comments

@rgaiacs
Copy link

rgaiacs commented Jan 6, 2015

This was discovery when using Gitit, see jgm/gitit#479.

Summary

Valid MathML tags are sanitezed.

Steps To Reproduce

  1. Generate a simple MathML element with Pandoc.

    $ pandoc -f markdown -t html --mathml <<EOF
    \$x\$
    EOF
    <p><math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mi>x</mi><annotation encoding="application/x-tex">x</annotation></semantics></math></p>
    
  2. Copy the MathML element and sanitize it.

Actual Results

<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><mi>x</mi>x</math>

This MathML element is invalid.

Expected Results

<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mi>x</mi><annotation encoding="application/x-tex">x</annotation></semantics></math></p>

This is the unchanged output from Pandoc.

Additional Information

The semantics and annotation tags are valid MathML 3, see http://www.w3.org/TR/MathML/chapter5.html#mixing.semantic.annotations for more information.

Environment Information

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.3
$ ghc-pkg list gitit 
   gitit-0.10.6.1
$ ghc-pkg list pandoc
   pandoc-1.13.3
$ ghc-pkg list texmath
   texmath-0.8.0.1
$ ghc-pkg list xss-sanitize
   xss-sanitize-0.3.5.4
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

1 participant