Index: /FCKeditor/trunk/_whatsnew.html
===================================================================
--- /FCKeditor/trunk/_whatsnew.html	(revision 2173)
+++ /FCKeditor/trunk/_whatsnew.html	(revision 2174)
@@ -75,4 +75,6 @@
 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1645">#1645</a>] Added warning message
 			about Firefox 3's strict origin policy.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2272">#2272</a>] Improved the
+			garbage filter in Paste from Word dialog.</li>
 	</ul>
 	<p>
Index: /FCKeditor/trunk/editor/dialog/fck_paste.html
===================================================================
--- /FCKeditor/trunk/editor/dialog/fck_paste.html	(revision 2173)
+++ /FCKeditor/trunk/editor/dialog/fck_paste.html	(revision 2174)
@@ -188,5 +188,5 @@
 
 	html = html.replace(/<o:p>\s*<\/o:p>/g, '') ;
-	html = html.replace(/<o:p>.*?<\/o:p>/g, '&nbsp;') ;
+	html = html.replace(/<o:p>[\s\S]*?<\/o:p>/g, '&nbsp;') ;
 
 	// Remove mso-xxx styles.
@@ -225,4 +225,8 @@
 		html = html.replace( /<(\w[^>]*) style="([^\"]*)"([^>]*)/gi, "<$1$3" ) ;
 
+	// Remove style, meta and link tags
+	html = html.replace( /<STYLE[^>]*>[\s\S]*?<\/STYLE[^>]*>/gi, '' ) ;
+	html = html.replace( /<(?:META|LINK)[^>]*>\s*/gi, '' ) ;
+
 	// Remove empty styles.
 	html =  html.replace( /\s*style="\s*"/gi, '' ) ;
@@ -235,16 +239,19 @@
 	html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ;
 
-	html = html.replace( /<SPAN\s*>(.*?)<\/SPAN>/gi, '$1' ) ;
-
-	html = html.replace( /<FONT\s*>(.*?)<\/FONT>/gi, '$1' ) ;
+	html = html.replace( /<SPAN\s*>([\s\S]*?)<\/SPAN>/gi, '$1' ) ;
+
+	html = html.replace( /<FONT\s*>([\s\S]*?)<\/FONT>/gi, '$1' ) ;
 
 	// Remove XML elements and declarations
 	html = html.replace(/<\\?\?xml[^>]*>/gi, '' ) ;
 
+	// Remove w: tags with contents.
+	html = html.replace( /<w:[^>]*>[\s\S]*?<\/w:[^>]*>/gi, '' ) ;
+
 	// Remove Tags with XML namespace declarations: <o:p><\/o:p>
 	html = html.replace(/<\/?\w+:[^>]*>/gi, '' ) ;
 
 	// Remove comments [SF BUG-1481861].
-	html = html.replace(/<\!--.*?-->/g, '' ) ;
+	html = html.replace(/<\!--[\s\S]*?-->/g, '' ) ;
 
 	html = html.replace( /<(U|I|STRIKE)>&nbsp;<\/\1>/g, '&nbsp;' ) ;
@@ -253,5 +260,5 @@
 
 	// 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
@@ -268,6 +275,6 @@
 
 		// Word likes to insert extra <font> tags, when using MSIE. (Wierd).
-		html = html.replace( /<(H\d)><FONT[^>]*>(.*?)<\/FONT><\/\1>/gi, '<$1>$2<\/$1>' );
-		html = html.replace( /<(H\d)><EM>(.*?)<\/EM><\/\1>/gi, '<$1>$2<\/$1>' );
+		html = html.replace( /<(H\d)><FONT[^>]*>([\s\S]*?)<\/FONT><\/\1>/gi, '<$1>$2<\/$1>' );
+		html = html.replace( /<(H\d)><EM>([\s\S]*?)<\/EM><\/\1>/gi, '<$1>$2<\/$1>' );
 	}
 	else
@@ -283,5 +290,5 @@
 
 		// Transform <P> to <DIV>
-		var re = new RegExp( '(<P)([^>]*>.*?)(<\/P>)', 'gi' ) ;	// Different because of a IE 5.0 error
+		var re = new RegExp( '(<P)([^>]*>[\\s\\S]*?)(<\/P>)', 'gi' ) ;	// Different because of a IE 5.0 error
 		html = html.replace( re, '<div$2<\/div>' ) ;
 
