--- kernel/classes/datatypes/ezxmltext/ezxmlinputparser.php
+++ kernel/classes/datatypes/ezxmltext/ezxmlinputparser.php
@@ -586,38 +586,28 @@
 
     function parseAttributes( $attributeString )
     {
-        // Convert single quotes to double quotes
-        $attributeString = preg_replace( "/ +([a-zA-Z0-9:-_#\-]+) *\='(.*?)'/e", "' \\1'.'=\"'.'\\2'.'\"'", ' ' . $attributeString );
-
-        // Convert no quotes to double quotes and remove extra spaces
-        $attributeString = preg_replace( "/ +([a-zA-Z0-9:-_#\-]+) *\= *([^\s'\"]+)/e", "' \\1'.'=\"'.'\\2'.'\" '", $attributeString );
-
-        // Split by quotes followed by spaces
-        $attributeArray = preg_split( "#(?<=\") +#", $attributeString );
-
         $attributes = array();
-        foreach( $attributeArray as $attrStr )
-        {
-            if ( !$attrStr || strlen( $attrStr ) < 4 )
-            {
-                continue;
-            }
-
-            list( $attrName, $attrValue ) = preg_split( "/ *= *\"/", $attrStr );
-
-            $attrName = strtolower( trim( $attrName ) );
-            if ( !$attrName )
-            {
-                continue;
-            }
-
-            $attrValue = substr( $attrValue, 0, -1 );
-            if ( $attrValue === '' || $attrValue === false )
-            {
-                continue;
+        // Valid characters for XML attributes
+        // @see http://www.w3.org/TR/xml/#NT-Name
+        $nameStartChar = ':A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\x{2FF}\\x{370}-\\x{37D}\\x{37F}-\\x{1FFF}\\x{200C}-\\x{200D}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}';
+        if (
+            preg_match_all(
+                "/\s+([$nameStartChar][$nameStartChar\-.0-9\\xB7\\x{0300}-\\x{036F}\\x{203F}-\\x{2040}]*)\s*=\s*(?:(?:\"([^\"]+?)\")|(?:'([^']+?)')|(?: *([^\"'\s]+)\s*))/u",
+                " " . $attributeString,
+                $attributeArray,
+                PREG_SET_ORDER
+            )
+        )
+        {
+            foreach ( $attributeArray as $attribute )
+            {
+                // Value will always be at the last position
+                $value = trim( array_pop( $attribute ) );
+                if ( !empty( $value ) )
+                {
+                    $attributes[strtolower( $attribute[1] )] = $value;
+                }
             }
-
-            $attributes[$attrName] = $attrValue;
         }
 
         return $attributes;
