Skip to content

Commit 55abe89

Browse files
authored
Merge pull request #1962 from dpvc/issue1951
Properly handle namespaces starting with 'math'. #1951
2 parents 6f72a5c + d0ac5ad commit 55abe89

File tree

1 file changed

+1
-1
lines changed
  • unpacked/jax/input/MathML

1 file changed

+1
-1
lines changed

unpacked/jax/input/MathML/jax.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@
209209
math = match[1].replace(/ (?!xmlns=)([a-z]+=(['"])http:.*?\2)/ig," xmlns:$1 $1") +
210210
math.substr(match[0].length);
211211
}
212-
if (math.match(/^<math/i) && !math.match(/^<[^<>]* xmlns=/)) {
212+
if (math.match(/^<math[ >]/i) && !math.match(/^<[^<>]* xmlns=/)) {
213213
// append the MathML namespace
214214
math = math.replace(/^<(math)/i,'<math xmlns="http://www.w3.org/1998/Math/MathML"')
215215
}

0 commit comments

Comments
 (0)