--- popup_filter.module	2009-07-15 13:50:50.000000000 +0200
+++ popup_filter.module	2009-07-16 12:58:45.000000000 +0200
@@ -403,26 +403,27 @@
 
 
 function _tag_attributes($tag){
-  $attributes = array();
+
   $inner = ereg_replace('\ ?\=\ ?', '=', trim(substr($tag, 6, strlen($tag) - 7)));
 
   $attribPattern = 
-    '([^\ ]*=[\"][^\"]+[\"])|'. // xx-_.01="..."
-    '([^\ ]*=[\'][^\']+[\'])|'. // xx-_.01='...'
-    '([^\ ]*=[0-9]*)|'.         // xx-_.01=0123
-    '([^\ ]*=[^\ ]*)|'.         // xx-_.01=xx-_.01
-    '[\ ][^\ \=]+[\ ]|'.        // xx-_.01
-    '[\ ][^\ \=]+$';            // xx-_.01]
-  while (ereg($attribPattern, $inner, $result)){
-    $found = split('=', $result[0]);
-    $inner = str_replace($result[0], '', $inner);
-    
+    '/[^\ ]*="[^"]+"|'.        // xx-_.01="..."
+    '[^\ ]*=[\'][^\']+[\']|'.  // xx-_.01='...'
+    '[^\ ]*=[^\ ]*|'.          // xx-_.01=xx-_.01
+    '\s+[^\ =]+\s+|'.          // xx-_.01
+    '[\ ][^\ \=]+$/';          // xx-_.01]
+
+  preg_match_all($attribPattern, $inner, $matches);
+
+  $attributes = array();
+  foreach($matches[0] as $match){
+    $found = split('=', $match);
     $attribute = trim($found[0]); 
     $value = ereg_replace('^[\'\"]|[\'\"]$', '', trim($found[1]));
-    
-    $attributes[$attribute] = $value
+    $attributes[$attribute] = strlen(trim($value))
       ? $value
-      : 1;
+      : TRUE;
   }
+  
   return $attributes;
 }
\ No newline at end of file
