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.

CommentFileSizeAuthor
#2 node_prepare.patch860 bytesmerlinofchaos

Comments

Thox’s picture

Please submit a patch rather than post code in your message.

merlinofchaos’s picture

Status: Active » Needs review
StatusFileSize
new860 bytes

Here is the same info in patch form.

green monkey’s picture

Status: Needs review » Closed (fixed)

closed on age - if request still active - please resubmit