Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
53eaba45
Commit
53eaba45
authored
Oct 04, 2006
by
Dries Buytaert
Browse files
- Patch
#87065
by Eaton et al: correct filtering of PHP nodes.
parent
fbc47b43
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/node/node.module
View file @
53eaba45
...
...
@@ -665,8 +665,22 @@ function node_view($node, $teaser = FALSE, $page = FALSE, $links = TRUE) {
* Apply filters and build the node's standard elements.
*/
function node_prepare($node, $teaser = FALSE) {
// First we'll overwrite the existing node teaser and body with
// the filtered copies! Then, we'll stick those into the content
// array and set the read more flag if appropriate.
if (strlen($node->teaser) < strlen($node->body)) {
$node->readmore = TRUE;
}
if ($teaser == FALSE) {
$node->body = check_markup($node->body, $node->format, FALSE);
}
else {
$node->teaser = check_markup($node->teaser, $node->format, FALSE);
}
$node->content['body'] = array(
'#value' =>
check_markup(
$teaser ? $node->teaser : $node->body,
$node->format, FALSE),
'#value' => $teaser ? $node->teaser : $node->body,
'#weight' => 0,
);
...
...
@@ -677,10 +691,6 @@ function node_prepare($node, $teaser = FALSE) {
);
}
if (strlen($node->teaser) < strlen($node->body)) {
$node->readmore = TRUE;
}
return $node;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment