If there is a named entity in a node body (and exactly the wrong length from the start), the teaser generated will include the beginning of the named entity, but not the end.

(see here for an example -- look at the "Yahoo Pipes" teaser -- it ends with "&quo")

Expected behavior: any (named) entity is either completely included or completely not included in the teaser.

Comments

gpk’s picture

Version: 5.1 » 6.x-dev

This behaviour is occurring because although Drupal attempts to end the teaser at the end of a sentence if the first paragraph exceeds the maximum teaser length it does not recognise ".&nbsp" as an end-of-sentence delimiter, only ". " (i.e. fullstop followed by a normal space) - your site makes extensive use of the former.

AlexisWilke’s picture

Issue tags: +teaser

@gpk It seems to me that a   means DO NOT BREAK... but of course, this is the teaser... 8-)

@Wesley,

I created a patch that I posted here:

#221257: text_summary() should output valid HTML and Unicode text

I would think that this problem will be fixed by my patch. The Core calls the truncate_utf8() function cutting whatever in its way including entities, tags and comments. My patch fixes that problem.

Thank you.
Alexis

Status: Active » 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.