One more transaction about Feature #541 - ASCIMathML.js: A javascript error on Opera has been suppressed. Additional address (for choice) of public latex rendering service has been added.

skala
Ivan Tcholakov 15 years ago
parent 9536bc2043
commit 4df41b98a0
  1. 7
      main/inc/lib/asciimath/ASCIIMathML.js
  2. 48
      main/inc/lib/fckeditor/editor/plugins/customizations/fckplugin.js
  3. 2
      main/inc/lib/fckeditor/editor/plugins/customizations/fckplugin_compressed.js

@ -82,6 +82,9 @@ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
//var AMTcgiloc = "http://chart.apis.google.com/chart?cht=tx&chl=";
//var AMTcgiloc = "http://chart.apis.google.com/chart?cht=tx&chs=1x0&chl=";
//
//var AMTcgiloc = "http://codecogs.izyba.com/gif.latex";
//var AMTcgiloc = "http://codecogs.izyba.com/png.latex";
//
var AMTcgiloc = "http://chart.apis.google.com/chart?cht=tx&chs=1x0&chl=";
//
@ -1504,6 +1507,8 @@ function AMTparseMath(str,istex) {
texstring = "\\gammacorrection{1.4}\\usepackage{color}\\color\{" + mathcolor + "\}" + texstring;
} else if (AMTcgiloc.match(/mimetex/)) {
texstring = "\\" + mathcolor + texstring;
} else if (AMTcgiloc.match(/.latex/)) {
texstring = texstring = "\\color\{" + mathcolor + "\}" + texstring;
}
}
if (displaystyle) {
@ -1944,7 +1949,7 @@ function AMautomathrec(str) {
function processNodeR(n, linebreaks,latex) {
var mtch, str, arr, frg, i;
if (n.childNodes.length == 0) {
if ((n.nodeType!=8 || linebreaks) &&
if ((n.nodeType!=8 || linebreaks) && n.parentNode &&
n.parentNode.nodeName!="form" && n.parentNode.nodeName!="FORM" &&
n.parentNode.nodeName!="textarea" && n.parentNode.nodeName!="TEXTAREA" /*&&
n.parentNode.nodeName!="pre" && n.parentNode.nodeName!="PRE"*/) {

@ -1484,21 +1484,39 @@ FCK.IsRealImage = function ( tag )
return false ;
}
return ( tag.nodeName.IEquals( 'img' )
&& !tag.getAttribute( '_fckfakelement' )
&& !tag.getAttribute( '_fckflash' )
&& !tag.getAttribute( '_fckmp3' )
&& !tag.getAttribute( '_fckvideo' )
&& !tag.getAttribute( 'MapNumber' )
&& !( tag.getAttribute( 'src' ) && tag.getAttribute( 'src' ).toString().indexOf( 'mimetex?' ) >= 0 )
&& !( tag.getAttribute( 'src' ) && tag.getAttribute( 'src' ).toString().indexOf( 'mimetex.cgi?' ) >= 0 )
&& !( tag.getAttribute( 'src' ) && tag.getAttribute( 'src' ).toString().indexOf( 'mimetex.exe?' ) >= 0 )
&& !( tag.getAttribute( 'src' ) && tag.getAttribute( 'src' ).toString().indexOf( 'mathtex?' ) >= 0 )
&& !( tag.getAttribute( 'src' ) && tag.getAttribute( 'src' ).toString().indexOf( 'mathtex.cgi?' ) >= 0 )
&& !( tag.getAttribute( 'src' ) && tag.getAttribute( 'src' ).toString().indexOf( 'mathtex.exe?' ) >= 0 )
&& !( tag.getAttribute( 'src' ) && tag.getAttribute( 'src' ).toString().indexOf( 'mathtran?' ) >= 0 )
&& !( tag.getAttribute( 'src' ) && tag.getAttribute( 'src' ).toString().indexOf( 'google.com/chart?' ) >= 0 )
) ? true : false ;
if ( tag.nodeName.IEquals( 'img' ) )
{
if ( tag.getAttribute( '_fckfakelement' )
|| tag.getAttribute( '_fckflash' )
|| tag.getAttribute( '_fckmp3' )
|| tag.getAttribute( '_fckvideo' )
|| tag.getAttribute( 'MapNumber' )
)
{
return false ;
}
if ( tag.getAttribute( 'src' ) )
{
var src = tag.getAttribute( 'src' ).toString() ;
return ( src.indexOf( 'mimetex?' ) == -1
&& src.indexOf( 'mimetex.cgi?' ) == -1
&& src.indexOf( 'mimetex.exe?' ) == -1
&& src.indexOf( 'mathtex?' ) == -1
&& src.indexOf( 'mathtex.cgi?' ) == -1
&& src.indexOf( 'mathtex.exe?' ) == -1
&& src.indexOf( 'mathtran?' ) == -1
&& src.indexOf( 'google.com/chart?' ) == -1
&& src.indexOf( 'latex?' ) == -1
) ? true : false ;
}
else
{
return true ;
}
}
return false ;
} ;
// Checking for audio file reference which is to be used by a flash player.

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save