Skip to content

Commit d0ac5ad

Browse files
committed
Fix regular expression to not match namespaces starting with 'math'. Resolves issue #1951.
1 parent 1e28a76 commit d0ac5ad

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)