Index: moodle/lib/weblib.php
--- moodle/lib/weblib.php Base (1.970.2.156)
+++ moodle/lib/weblib.php Locally Modified (Based On 1.970.2.156)
@@ -6446,15 +6446,20 @@
             echo "\n<ul class='list'>\n";            
             foreach ($list as $key => $string) {                
                 echo '<li class="r'. $row .'">';
-                if ($icons) {           // Hacky way to insert the icon into the link.  See MDL-6820
-                    $splitstring = explode ('</a>', $string);                    
-                    $splitstring[0] = str_replace('">', '">'.$icons[$key].'&nbsp;', $splitstring[0]);
-                    $splitstring[0] = str_replace('" >', '">'.$icons[$key].'&nbsp;', $splitstring[0]);                    
+                if ($icons) {      // Hacky way to insert the icon into the link.  See MDL-6820
+                    // Make block icon clickable if configured and there is html in the block text    
+                    $splitstring = explode ('</a>', $string, 2);                    
+                    $replacestring = '"><div class="icon column c0">'.$icons[$key].'</div><div class="column c1">';
+                    $splitstring[0] = str_replace('">', $replacestring, $splitstring[0]);
+                    $splitstring[0] = str_replace('" >', $replacestring, $splitstring[0]);                    
+                    if (count($splitstring) > 1 ) {
+                        $splitstring[0] .= '</div>';
+                    }
                     $newstring = implode ('</a>', $splitstring);
                     
-                    // Make block icon clickable if configured and there is html in the block text                    
-                    if ($newstring == $string) {  // No link found, so insert before the string
-                        $newstring = $icons[$key].'&nbsp;'.$string;                        
+                    if (trim($newstring) == trim($string)) {  // No link found, so insert before the string                        
+                        $newstring  = '<div class="icon column c0">' . $icons[$key].'</div>';
+                        $newstring .= '<div class="column c1">'.$string . '</div>';
                     }
                     $string = $newstring;
                 }
