[drupal-devel] [bug] Fix a serious bug and clean up teaser
generation
Goba
drupal-devel at drupal.org
Sun Mar 13 14:42:59 UTC 2005
Issue status update for http://drupal.org/node/18836
Project: Drupal
Version: cvs
Component: node system
Category: bug reports
Priority: normal
Assigned to: Goba
Reported by: Goba
Updated by: Goba
Status: patch
Attachment: http://drupal.org/files/issues/Drupal.teaser-bugfix-and-cleanup.patch (4.48 KB)
The node teaser generator keeps the whole body as the teaser, if there
is indication that PHP code is included in the body (since it is
unkown, what is going to come out of the PHP parser). The only serious
problem is that it does not check if the PHP filter is included in the
input format, so it does keep the complete body even if there is no PHP
parsing on the code. This breaks PHP code examples in articles or blog
posts, which are not supposed to be parsed, but which require proper
teasers.
The solution is to make the teaser generation code aware of the input
format (pass the whole node), and let it provide the teaser that way,
depending on the input format.
The attached patch also cleans up that very unprofessionaly looking
sequence of copy-pasted stuff in the node_teaser function.
Goba
More information about the drupal-devel
mailing list