X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Ffckeditor%2Feditor%2Fdialog%2Ffck_paste.html;h=3e11da1037a1e8ee16828164f68f0b87f7034f5f;hp=fd16c317a5be78b51367277cc08dacace6402b92;hb=18067f0bd41356e905666128c5e8105d1fca7c60;hpb=d0b2224eefe4df27ba4f5158a58fb86f9221301c diff --git a/httemplate/elements/fckeditor/editor/dialog/fck_paste.html b/httemplate/elements/fckeditor/editor/dialog/fck_paste.html index fd16c317a..3e11da103 100644 --- a/httemplate/elements/fckeditor/editor/dialog/fck_paste.html +++ b/httemplate/elements/fckeditor/editor/dialog/fck_paste.html @@ -1,7 +1,7 @@ /g, '' ) ; + html = html.replace(/<\!--[\s\S]*?-->/g, '' ) ; html = html.replace( /<(U|I|STRIKE)> <\/\1>/g, ' ' ) ; html = html.replace( /\s*<\/H\d>/gi, '' ) ; // Remove "display:none" tags. - html = html.replace( /<(\w+)[^>]*\sstyle="[^"]*DISPLAY\s?:\s?none(.*?)<\/\1>/ig, '' ) ; + html = html.replace( /<(\w+)[^>]*\sstyle="[^"]*DISPLAY\s?:\s?none[\s\S]*?<\/\1>/ig, '' ) ; + + // Remove language tags + html = html.replace( /<(\w[^>]*) language=([^ |>]*)([^>]*)/gi, "<$1$3") ; + + // Remove onmouseover and onmouseout events (from MS Word comments effect) + html = html.replace( /<(\w[^>]*) onmouseover="([^\"]*)"([^>]*)/gi, "<$1$3") ; + html = html.replace( /<(\w[^>]*) onmouseout="([^\"]*)"([^>]*)/gi, "<$1$3") ; if ( FCKConfig.CleanWordKeepsStructure ) { @@ -202,8 +275,8 @@ function CleanWord( oNode, bIgnoreFont, bRemoveStyles ) html = html.replace( /]*)>/gi, '' ) ; // Word likes to insert extra tags, when using MSIE. (Wierd). - html = html.replace( /<(H\d)>]*>(.*?)<\/FONT><\/\1>/gi, '<$1>$2<\/$1>' ); - html = html.replace( /<(H\d)>(.*?)<\/EM><\/\1>/gi, '<$1>$2<\/$1>' ); + html = html.replace( /<(H\d)>]*>([\s\S]*?)<\/FONT><\/\1>/gi, '<$1>$2<\/$1>' ); + html = html.replace( /<(H\d)>([\s\S]*?)<\/EM><\/\1>/gi, '<$1>$2<\/$1>' ); } else { @@ -217,7 +290,7 @@ function CleanWord( oNode, bIgnoreFont, bRemoveStyles ) html = html.replace( /<\/H\d>/gi, '<\/font><\/b><\/div>' ) ; // Transform

to

- var re = new RegExp( '(]*>.*?)(<\/P>)', 'gi' ) ; // Different because of a IE 5.0 error + var re = new RegExp( '(]*>[\\s\\S]*?)(<\/P>)', 'gi' ) ; // Different because of a IE 5.0 error html = html.replace( re, '' ) ; // Remove empty tags (three times, just to be sure). @@ -251,33 +324,22 @@ function CleanWord( oNode, bIgnoreFont, bRemoveStyles ) - + - - - - - - -
- - -
- - -
- -
+ + + +
+ + +