Skip to content

[FEATURE]: Update library to handle MathJax v4 and remove v2 support #7598

Closed

Description

@camdecoster

Description

Update library to handle MathJax v4 and remove v2 support.

Why should this feature be added?

  • v4 was recently released and mostly adds features which could be useful to users
  • v2 contains a security vulnerability (ReDoS attack). While this issue doesn't affect the library much (only used as a dev dependency), it shows up as a warning with npm audit.
  • The latest v2 release came out in 2020
  • Removing v2 support would simplify the code

Notes

  • This would be a breaking change
  • The upgrade process looks pretty straightforward
  • Jupyter bundles a version of MathJax and the library needs to remain compatible with that

Activity

  1. added this to the v4.0.0 milestone on Oct 21, 2025
  2. emilykl commented on Jun 17, 2026

    @emilykl
    Contributor

    Looks like JupyterLab switched to MathJax v3 with the release of JupyterLab 4.0 in May 2023.

    So as long as we want to keep compatibility with JupyterLab 3.x in Plotly.py, we need to keep MathJax v2 support in Plotly.js. So the question is how long we want to maintain JupyterLab 3.x support.

    Alternatively: Looks like Jupyter does publish a jupyter-mathjax3 Python library which enables using MathJax 3 in JupyterLab 3.x, so there is a workaround for those who want to continue using JupyterLab 3.x, although I haven't tried it yet.

    Feels borderline to me — JupyterLab 4 is "only" 3 years old, but it's also no longer supported by Jupyter.

  3. emilykl commented on Jun 22, 2026

    @emilykl
    Contributor

    N.B.: Need to release a Kaleido version which defaults to MathJax v3 before dropping support for v2 in Plotly.js.

    plotly/kaleido#462

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions