Index: moodle/lib/weblib.php
--- moodle/lib/weblib.php Base (1.970.2.155)
+++ moodle/lib/weblib.php Locally Modified (Based On 1.970.2.155)
@@ -6446,8 +6446,12 @@
             foreach ($list as $key => $string) {
                 echo '<li class="r'. $row .'">';
                 if ($icons) {          // Hacky way to insert the icon into the link.  See MDL-6820
-                    $newstring = str_replace('">', '">'.$icons[$key].'&nbsp;', $string);
-                    $newstring = str_replace('" >', '">'.$icons[$key].'&nbsp;', $newstring);
+                    $splitstring = explode ('</a>', $string);                    
+                    $splitstring[0] = str_replace('">', '">'.$icons[$key].'&nbsp;', $splitstring[0]);
+                    $splitstring[0] = str_replace('" >', '">'.$icons[$key].'&nbsp;', $splitstring[0]);                    
+                    $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;
                     }
