Ticket #1220: xinha_superclean_args.diff

File xinha_superclean_args.diff, 1.4 KB (added by guest, 12 years ago)
  • plugins/SuperClean/super-clean.js

    Nur in xinha/plugins: Curator.
    Nur in xinha/plugins: ImageProperties.
    diff -ur xinha.orig/plugins/SuperClean/super-clean.js xinha/plugins/SuperClean/super-clean.js
    old new  
    5858 
    5959    if(opts.tidy) 
    6060    { 
    61       var callback = function(javascriptResponse)  
    62       {  
     61      var callback = function(javascriptResponse) 
     62      { 
    6363        eval("var response = " + javascriptResponse); 
    6464        switch (response.action) 
    6565        { 
     
    7171          break; 
    7272        } 
    7373      } 
    74       Xinha._postback(editor.config.SuperClean.tidy_handler, {'content' : editor.getInnerHTML()},callback); 
     74 
     75      var args = editor.config.SuperClean.tidy_args; 
     76      if ( typeof args != 'object' ) { 
     77        args = {}; 
     78      } 
     79      args['content'] =  editor.getInnerHTML(); 
     80 
     81      Xinha._postback(editor.config.SuperClean.tidy_handler, args, callback); 
    7582    } 
    7683    return true; 
    7784  } 
     
    112119  // it's called through XMLHTTPRequest 
    113120  'tidy_handler': Xinha.getPluginDir("SuperClean") + '/tidy.php', 
    114121 
     122  // set additional arguments needed for the tidy request 
     123  'tidy_args' : {}, 
     124 
    115125  //avaliable filters (these are built-in filters) 
    116126  // You can either use 
    117127  //    'filter_name' : "Label/Description String"