print $content statement in node.tpl.php (Drupal 5) is causing my whole layout to break probably due to incorrect nesting of DIVs inside it.
I want to check and fix that but I can't figure out what/where is the source of the $content variable in node.tpl.php file.
I'd appreciate any help. Thanks.
You could use the Theme Developer module to find out what goes inside it. Generally $content in node.tpl.php simply outputs the body of the node. If there is more going on, it should either be in template.php or in a separate node-*.tpl.php or in a custom module.
If you try to validate your site, you can find out if a
div was left unclosed.
Are you positive it's in node.tpl.php? $content is dumped out through page.tpl.php, comment.tpl.php, page-front.tpl.php and any [content-type].tpl.php.
Your best bet is to post your node.tpl.php so we can see it.
If your problem is with invalid HTML in the
$content variable (rather than in the template itself) you should enable the "HTML corrector" filter on whatever input format you are using. This will correct most improperly closed tags. I enable this filter on any input type that allows user HTML input.
This filter is part of Drupal core in Drupal 6.x, and available here for Drupal 5.x