mathjax / mathjax/MathJax

[v2] accidentally create a global variable `window.value`

Open
#2,710 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Accepted Ready for Development v2
Dominant language
JavaScript
Stars
10.9k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

https://github.com/mathjax/MathJax/blob/legacy-v2/unpacked/extensions/toMathML.js#L71

The above line accidentally create a global variable value, which may cause problems if other codes rely on window.value
This issue affects all sites with MathJax v2, including Stack Exchange: open this page and window.hasOwnProperty('value') will be true

Add the missing var will fix this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open extensions/toMathML.js at line 71 and inspect the statement identified in the issue. Add the missing declaration, then verify that using the extension no longer creates window.value; test the behavior in a browser or with the existing MathJax test setup if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.