Fix problem with < and & getting translated too early in MathML input
This commit is contained in:
parent
3b1ce25719
commit
af238273c0
|
@ -13,6 +13,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
MathJax.Unpack([
|
MathJax.Unpack([
|
||||||
['MathJax.InputJax','.MathML','=',0,'({name:"','MathML",','version:"1.0",directory:',0,'.directory+"/',5,'extensionDir',':',0,'.',10,'+"/',5,'entityDir:',0,8,'MathML/entities",require:[MathJax.ElementJax',8,'mml/jax.js"],config:{useMathMLspacing:false}});',0,1,'.Register("math/mml");',0,1,'.loadComplete("config.js");']
|
['MathJax.InputJax','.MathML','=',0,'({name:"','MathML",','version:"1.0.1",directory:',0,'.directory+"/',5,'extensionDir',':',0,'.',10,'+"/',5,'entityDir:',0,8,'MathML/entities",require:[MathJax.ElementJax',8,'mml/jax.js"],config:{useMathMLspacing:false}});',0,1,'.Register("math/mml");',0,1,'.loadComplete("config.js");']
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
MathJax.InputJax.MathML = MathJax.InputJax({
|
MathJax.InputJax.MathML = MathJax.InputJax({
|
||||||
name: "MathML",
|
name: "MathML",
|
||||||
version: "1.0",
|
version: "1.0.1",
|
||||||
directory: MathJax.InputJax.directory + "/MathML",
|
directory: MathJax.InputJax.directory + "/MathML",
|
||||||
extensionDir: MathJax.InputJax.extensionDir + "/MathML",
|
extensionDir: MathJax.InputJax.extensionDir + "/MathML",
|
||||||
entityDir: MathJax.InputJax.directory + "/MathML/entities",
|
entityDir: MathJax.InputJax.directory + "/MathML/entities",
|
||||||
|
|
|
@ -95,6 +95,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
replaceEntity: function (match,entity) {
|
replaceEntity: function (match,entity) {
|
||||||
|
if (entity === "lt" || entity === "amp") {return match}
|
||||||
if (MATHML.Parse.Entity[entity]) {return MATHML.Parse.Entity[entity]}
|
if (MATHML.Parse.Entity[entity]) {return MATHML.Parse.Entity[entity]}
|
||||||
var file = entity.charAt(0).toLowerCase();
|
var file = entity.charAt(0).toLowerCase();
|
||||||
var font = entity.match(/^[a-zA-Z](fr|scr|opf)$/);
|
var font = entity.match(/^[a-zA-Z](fr|scr|opf)$/);
|
||||||
|
@ -125,8 +126,7 @@
|
||||||
math = this.prefilterMathML(script.firstChild);
|
math = this.prefilterMathML(script.firstChild);
|
||||||
} else {
|
} else {
|
||||||
math = script.innerHTML.replace(/^\s+/,"").replace(/\s+$/,"");
|
math = script.innerHTML.replace(/^\s+/,"").replace(/\s+$/,"");
|
||||||
if (BROWSER.isMSIE)
|
if (BROWSER.isMSIE) {math = math.replace(/( )+$/,"")}
|
||||||
{math = math.replace(/( )+$/,"").replace(/&/g,"&").replace(/</g,"&lt;")}
|
|
||||||
else if (BROWSER.isKonqueror)
|
else if (BROWSER.isKonqueror)
|
||||||
{math = math.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}
|
{math = math.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}
|
||||||
math = this.prefilterMath(math,script);
|
math = this.prefilterMath(math,script);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user