By default in the VBO theme_views_bulk_operations_confirmation($variables) function has strong tag in the output:

$output = theme('item_list', array('items' => $items, 'title' => t('You selected the following <strong>!count</strong>:', array('!count' => $count))));

But not all themes have the same logic for 'theme_item_list' input parameters. E.g. in the bootstrap theme strong tag doesn't correctly display, because 'title' should be an array for including HTML. For correct displaying output should be:

$output = theme('item_list', array('items' => $items, 'title' => array('text' => t('You selected the following <strong>!count</strong>:', array('!count' => $count)), 'html' => TRUE)));

So I offer to remove strong tag from default output. I think that instead of getting bug by default, developers should add this tag in correct way(in theme function theme_views_bulk_operations_confirmation($variables)) if it is necessary for them.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

snap_x’s picture

Status: Active » Needs review
FileSize
650 bytes

Removed strong tag from function theme_views_bulk_operations_confirmation()

stupiddingo’s picture

Status: Needs review » Reviewed & tested by the community

Was seeing the same same behavior on bootstrap. This resolves it.

AswathyAjish’s picture

Thanks for the patch #1. It worked for me.

joelpittet’s picture

Assigned: snap_x » Unassigned
Status: Reviewed & tested by the community » Needs review
Issue tags: -bootstrap, -strong, -tags
FileSize
1001 bytes

How about using <em> through the %count? That is quite common and will escape the value correctly.

Also there were two spots where <strong> was used, so I covered both in the patch.

gdaw’s picture

Status: Needs review » Reviewed & tested by the community

Patch 4 works fine for our bootstrap site.

RTBC + 1

  • joelpittet committed cc2e2b4 on 7.x-3.x
    Issue #2508990 by snap_x, joelpittet: Incorrect displaying of a strong...
joelpittet’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @gdaw, I've committed this to the latest -dev release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.