Don't escape \n, \r, or \t in toMathML text output. (Issue #847.)
This commit is contained in:
parent
d6939060ed
commit
0df957f3c0
|
@ -43,7 +43,7 @@ MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function () {
|
|||
if (this.data[i]) {data.push(this.data[i].toMathML(SPACE))}
|
||||
else if (!this.isToken && !this.isChars) {data.push(SPACE+"<mrow />")}
|
||||
}
|
||||
if (this.isToken) {return space + "<"+tag+attr+">"+data.join("")+"</"+tag+">"}
|
||||
if (this.isToken || this.isChars) {return space + "<"+tag+attr+">"+data.join("")+"</"+tag+">"}
|
||||
if (inferred) {return data.join("\n")}
|
||||
if (data.length === 0 || (data.length === 1 && data[0] === ""))
|
||||
{return space + "<"+tag+attr+" />"}
|
||||
|
@ -109,7 +109,7 @@ MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function () {
|
|||
if (n <= 0xD7FF || 0xE000 <= n) {
|
||||
// Code points U+0000 to U+D7FF and U+E000 to U+FFFF.
|
||||
// They are directly represented by n.
|
||||
if (n < 0x20 || n > 0x7E) {
|
||||
if (n > 0x7E || (n < 0x20 && n !== 0x0A && n !== 0x0D && n !== 0x08)) {
|
||||
string[i] = "&#x"+n.toString(16).toUpperCase()+";";
|
||||
} else {
|
||||
var c =
|
||||
|
|
Loading…
Reference in New Issue
Block a user