Dotclear

Changeset 3736:e5a3454f5c58


Ignore:
Timestamp:
03/19/18 13:58:02 (7 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Better this way

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/dcLegacyEditor/js/jsToolBar/jsToolBar.wysiwyg.js

    r3735 r3736  
    489489  /* IE laisse souvent des attributs sans guillemets */ 
    490490  var myRegexp = /<[^>]+((\s+\w+\s*=\s*)([^"'][\w~@+$,%\/:.#?=&;!*()-]*))[^>]*?>/; 
     491  var myQuoteFn = function(str, val1, val2, val3) { 
     492    var tamponRegex = new RegExp(regexpEscape(val1)); 
     493    return str.replace(tamponRegex, val2 + '"' + val3 + '"'); 
     494  }; 
    491495  while (myRegexp.test(html)) { 
    492     html = html.replace( 
    493       myRegexp, 
    494       function(str, val1, val2, val3) { 
    495         var tamponRegex = new RegExp(regexpEscape(val1)); 
    496         return str.replace(tamponRegex, val2 + '"' + val3 + '"'); 
    497       } 
    498     ); 
     496    html = html.replace(myRegexp, myQuoteFn); 
    499497  } 
    500498 
Note: See TracChangeset for help on using the changeset viewer.

Sites map