Index: /CKTester/runners/yuitest/test.js
===================================================================
--- /CKTester/runners/yuitest/test.js	(revision 4449)
+++ /CKTester/runners/yuitest/test.js	(revision 4450)
@@ -1,3 +1,3 @@
-﻿/*
+/*
 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://CKTESTER.com/license
@@ -84,10 +84,10 @@
 		}
 
-		html = html.replace( /<\w[^>\/]*/g, function( match )
+		html = html.replace( /(<[^>\s]*)(.*?)(>)/g, function( match, start, body, end )
 			{
 				var attribs = [];
 				var hasClass;
 
-				match = match.replace( /\s([^\s=]+)=((?:"[^"]*")|(?:'[^']*')|(?:[^\s]+))/g, function( match, attName, attValue )
+				body = body.replace( /\s([^\s=]+)=((?:"[^"]*")|(?:'[^']*')|(?:[^\s]+))/g, function( match, attName, attValue )
 					{
 						if ( attName == 'style' )
@@ -111,5 +111,5 @@
 
 							// Join all rules with commas, removing spaces and adding an extra comma to the end.
-							attValue = '"' + rules && ( rules.join( ';' ).replace( /\s+/g, '' ) + ';' );
+							attValue = '"' + rules && ( rules.join( ';' ) + ';' );
 						}
 
@@ -131,5 +131,5 @@
 				attribs.sort( sorter );
 
-				var ret = match.replace( /\s*/g, '' );
+				var ret = start;
 
 				for ( var i = 0 ; i < attribs.length ; i++ )
@@ -138,4 +138,6 @@
 					ret += ( /^["']/ ).test( attribs[i][1] ) ? attribs[i][1] : '"' + attribs[i][1] + '"';
 				}
+
+				ret += end;
 
 				return ret;
