The use of node_prepare() in recipe_content() causes a loss of all the tags due to HTML filtering, unless the recipe is entered under the full HTML filter under Drupal 4.6.2.
After a little research, I replaced
return node_prepare();
with
return $node;
Since all node_prepare does (at this time) is to run the content through check_output(), I added the following lines to the beginning of recipe_content() to make sure that the filters were used:
$node->instructions = check_output($node->instructions);
$node->notes = check_output($node->notes);
$node->source = check_output($node->source);
$node->servings = check_output($node->servings);
I believe this covers any issues, though if node_prepare changes in future versions, this will have to be modified to compensate.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | node_prepare.patch | 860 bytes | merlinofchaos |
Comments
Comment #1
Thox commentedPlease submit a patch rather than post code in your message.
Comment #2
merlinofchaos commentedHere is the same info in patch form.
Comment #3
green monkey commentedclosed on age - if request still active - please resubmit