Hi
I have been using the node_example.module sample to learn a bit about writing drupal modules. I have run into a bit of a problem though with the node filters and I am hoping that a veteran developer could just clarify this issue for me.
The node_example.module has these two functions that are used to render the 'new' node:
function node_example_view(&$node, $teaser = FALSE, $page = FALSE) {
$node = node_example_content($node, $teaser);
return theme('node', $node, $teaser, $page);
}
function node_example_content($node, $teaser = FALSE) {
$order_info = theme('node_example_order_info', $node);
$node->body .= $order_info;
$node->teaser .= $order_info;
return node_prepare($node, $teaser);
}
function theme_node_example_order_info($node) {
$output = '<div class="node_example_order_info">';
$output .= t('The order is for %quantity, %colour items.', array('%quantity' => $node->quantity,
'%colour' => $node->colour));
$output .= '</div>';
return $output;
node->body is themed by node_example_content() and then filtered through node_prepare. One of the things that the theme does in insert a
into the node body. The problem is that the filter then removes the
.
Now my problem is:
How do I use my theme to insert the
tags that I want, but still prevent users from submitting node bodies that contain
tags.