if the fieldset contains an EM - all between <em></em> is not displayed.

<fieldset class=" collapsible collapsed"><legend>Modules in <em>modules</em></legend>
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

edmund.kwok’s picture

Title: fieldset legend incomplete » Fieldset title does not include text enclosed in tags when collapsed
Component: Garland theme » system.module
FileSize
10.74 KB

Managed to replicate this bug in 5.1 and with a contributed theme (glossyblue), tested on Firefox 2, Mac. When the fieldset is expanded, the title is displayed as usual, but when collapsed, text enclosed in tags (e.g. em, strong) are hidden. Changed title to reflect the issue better. See the attached screenshot for an example.

I traced it to a css declaration in the system.css file around line 309:

html.js fieldset.collapsed * {
  display: none;
}

Removing that seems to fix the problem and I don't see other repercussions. But I am no expert in css and not sure if it serves another purpose. Comments from css experts?

Steven’s picture

Removing that line will cause fieldsets to snap shut after the DOM completes loading. This wouldn't be noticable if you're only testing locally. Better patch needed.

ricabrantes’s picture

Any news???

beginner’s picture

Version: 5.1 » 7.x-dev

The bug is still present.
It was also reported here:
http://drupal.org/node/251292
I had to change the form definition from:

  $form[$role] = array(
    '#type' => 'fieldset',
    '#collapsible' => true,
    '#collapsed' => true,
    '#title' => t('Front Page for %rolename.', array('%rolename' => $rolename)),
  );

to

  $form[$role] = array(
    '#type' => 'fieldset',
    '#collapsible' => true,
    '#collapsed' => true,
    '#title' => t('Front Page for !rolename.', array('!rolename' => $rolename)), // % becomes !
  );
edmund.kwok’s picture

Status: Active » Needs review
FileSize
626 bytes

Attached patch seems to fix this issue in Safari 3.1 (Mac), Firefox 2.0.0.8 (Mac) and IE6 (Mac). Need more testing to verify though; not sure if there are any side effects.

Dublin Drupaller’s picture

Assigned: Unassigned » Dublin Drupaller

thanks for the patch edkwh...I'll test it later. Looks good.

Dub

Dublin Drupaller’s picture

Assigned: Dublin Drupaller » Unassigned

oops. wrong module. I don't have permissions to commit to the system.module. changing assigned to status

hass’s picture

As i remember from a Garland bug regarding this issue the above patch have side effects... try to search for a "garland legend" issue...

cburschka’s picture

As a warning, * affects tags that would not normally be displayed - not that the legend is likely to contain a script or a style tag, of course.

Status: Needs review » Needs work

The last submitted patch failed testing.

lilou’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

casey’s picture

Version: 7.x-dev » 6.x-dev
MA-Hugh’s picture

The bug definitely arises due the wildcard, either the core needs to filter out tags for collapsible titles or add something to allow certain formatting inside them.

I have tried several global fixes on my system, has anyone fully got this fixed?

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.