diff options
Diffstat (limited to 'modules/image')
-rw-r--r-- | modules/image/image.field.inc | 5 | ||||
-rw-r--r-- | modules/image/image.module | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/modules/image/image.field.inc b/modules/image/image.field.inc index 47a91c01d..f41df500f 100644 --- a/modules/image/image.field.inc +++ b/modules/image/image.field.inc @@ -511,8 +511,11 @@ function theme_image_formatter($variables) { $image = array( 'path' => $item['uri'], 'alt' => $item['alt'], - 'title' => $item['title'], ); + // Do not output an empty 'title' attribute. + if (drupal_strlen($item['title']) > 0) { + $image['title'] = $item['title']; + } if ($variables['image_style']) { $image['style_name'] = $variables['image_style']; diff --git a/modules/image/image.module b/modules/image/image.module index de99369f7..1793447ab 100644 --- a/modules/image/image.module +++ b/modules/image/image.module @@ -178,7 +178,7 @@ function image_theme() { 'style_name' => NULL, 'path' => NULL, 'alt' => '', - 'title' => '', + 'title' => NULL, 'attributes' => array(), 'getsize' => TRUE, ), |