summaryrefslogtreecommitdiff
path: root/modules/block/block.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/block/block.module')
-rw-r--r--modules/block/block.module3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/block/block.module b/modules/block/block.module
index efcb6ef07..93f4389e4 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -872,6 +872,9 @@ function template_preprocess_block(&$variables) {
$variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->region;
$variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->module;
$variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->module . '__' . $variables['block']->delta;
+
+ // Create a valid HTML ID and make sure it is unique.
+ $variables['block_html_id'] = drupal_html_id('block-' . $variables['block']->module . '-' . $variables['block']->delta);
}
/**