Any headline (h1,h2, h3, etc) with a link inside, like the block headlines, are stripped from those links by the JavaScript preventing widows.

Example:
<h2><a href="node/1">A block headline</a></h2>

would be displayed as:
<h2>A block headline</h2>

A quick solution would be replacing

    // Prevents Widows in Post Titles.
    // @see http://css-tricks.com/preventing-widows-in-post-titles/
    $(":header").each(function() {
      var wordArray = $(this).text().split(" ");
      if (wordArray.length > 2) {
        wordArray[wordArray.length-2] += "&nbsp;" + wordArray[wordArray.length-1];
        wordArray.pop();
        $(this).html(wordArray.join(" "));
      }
    });

with:

    // Prevents Widows in Post Titles.
    // @see http://css-tricks.com/preventing-widows-in-post-titles/
    $(":header:not(.header-processed)").addClass('header-processed').each(function() {
      // Check if the headline has a link inside.
      var obj;
      if ($('a', this).length) {
        obj = $('a', this);
      }
      else {
        obj = $(this);
      }

      var wordArray = obj.text().split(" ");
      if (wordArray.length > 2) {
        wordArray[wordArray.length-2] += "&nbsp;" + wordArray.pop();
        obj.html(wordArray.join(" "));
      }
    });

I am marking this major, since it breaks how the site navigation works. I'll update the dev release as soon as I can.

Thanks baptisten for pointing this out.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

osman’s picture

Assigned: Unassigned » osman
FileSize
1.85 KB

Patch is attached.

osman’s picture

Status: Active » Needs review
osman’s picture

Status: Needs review » Fixed

Committed the changes to 7.x-1.x-dev

Status: Fixed » Closed (fixed)

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