Changeset 2174
- Timestamp:
- 2008-07-04 09:54:43 (2 months ago)
- Location:
- FCKeditor/trunk
- Files:
-
- 2 modified
-
editor/dialog/fck_paste.html (modified) (6 diffs)
-
_whatsnew.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/editor/dialog/fck_paste.html
r1565 r2174 188 188 189 189 html = html.replace(/<o:p>\s*<\/o:p>/g, '') ; 190 html = html.replace(/<o:p> .*?<\/o:p>/g, ' ') ;190 html = html.replace(/<o:p>[\s\S]*?<\/o:p>/g, ' ') ; 191 191 192 192 // Remove mso-xxx styles. … … 225 225 html = html.replace( /<(\w[^>]*) style="([^\"]*)"([^>]*)/gi, "<$1$3" ) ; 226 226 227 // Remove style, meta and link tags 228 html = html.replace( /<STYLE[^>]*>[\s\S]*?<\/STYLE[^>]*>/gi, '' ) ; 229 html = html.replace( /<(?:META|LINK)[^>]*>\s*/gi, '' ) ; 230 227 231 // Remove empty styles. 228 232 html = html.replace( /\s*style="\s*"/gi, '' ) ; … … 235 239 html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ; 236 240 237 html = html.replace( /<SPAN\s*>( .*?)<\/SPAN>/gi, '$1' ) ;238 239 html = html.replace( /<FONT\s*>( .*?)<\/FONT>/gi, '$1' ) ;241 html = html.replace( /<SPAN\s*>([\s\S]*?)<\/SPAN>/gi, '$1' ) ; 242 243 html = html.replace( /<FONT\s*>([\s\S]*?)<\/FONT>/gi, '$1' ) ; 240 244 241 245 // Remove XML elements and declarations 242 246 html = html.replace(/<\\?\?xml[^>]*>/gi, '' ) ; 243 247 248 // Remove w: tags with contents. 249 html = html.replace( /<w:[^>]*>[\s\S]*?<\/w:[^>]*>/gi, '' ) ; 250 244 251 // Remove Tags with XML namespace declarations: <o:p><\/o:p> 245 252 html = html.replace(/<\/?\w+:[^>]*>/gi, '' ) ; 246 253 247 254 // Remove comments [SF BUG-1481861]. 248 html = html.replace(/<\!-- .*?-->/g, '' ) ;255 html = html.replace(/<\!--[\s\S]*?-->/g, '' ) ; 249 256 250 257 html = html.replace( /<(U|I|STRIKE)> <\/\1>/g, ' ' ) ; … … 253 260 254 261 // Remove "display:none" tags. 255 html = html.replace( /<(\w+)[^>]*\sstyle="[^"]*DISPLAY\s?:\s?none (.*?)<\/\1>/ig, '' ) ;262 html = html.replace( /<(\w+)[^>]*\sstyle="[^"]*DISPLAY\s?:\s?none[\s\S]*?<\/\1>/ig, '' ) ; 256 263 257 264 // Remove language tags … … 268 275 269 276 // Word likes to insert extra <font> tags, when using MSIE. (Wierd). 270 html = html.replace( /<(H\d)><FONT[^>]*>( .*?)<\/FONT><\/\1>/gi, '<$1>$2<\/$1>' );271 html = html.replace( /<(H\d)><EM>( .*?)<\/EM><\/\1>/gi, '<$1>$2<\/$1>' );277 html = html.replace( /<(H\d)><FONT[^>]*>([\s\S]*?)<\/FONT><\/\1>/gi, '<$1>$2<\/$1>' ); 278 html = html.replace( /<(H\d)><EM>([\s\S]*?)<\/EM><\/\1>/gi, '<$1>$2<\/$1>' ); 272 279 } 273 280 else … … 283 290 284 291 // Transform <P> to <DIV> 285 var re = new RegExp( '(<P)([^>]*> .*?)(<\/P>)', 'gi' ) ; // Different because of a IE 5.0 error292 var re = new RegExp( '(<P)([^>]*>[\\s\\S]*?)(<\/P>)', 'gi' ) ; // Different because of a IE 5.0 error 286 293 html = html.replace( re, '<div$2<\/div>' ) ; 287 294 -
FCKeditor/trunk/_whatsnew.html
r2170 r2174 75 75 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1645">#1645</a>] Added warning message 76 76 about Firefox 3's strict origin policy.</li> 77 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2272">#2272</a>] Improved the 78 garbage filter in Paste from Word dialog.</li> 77 79 </ul> 78 80 <p>