How to display plain html I have inherited a drupal site with a few modules. 
They're not exactly written according to best practices... they return html code instead of renderable arrays. In other words, they do this:

function custommodule(){
 $output = '&lt;p&gt; Some output. &lt;/p&gt; &lt;p&gt; Some more output. &lt;/p&gt;';
 return $output;
}


Instead of this: 

function custommodule(){
   $args = array( arg1, arg2 );
   return theme('sometheme', $args);
}


The output is supposed to be displayed in the content region. However, since plain html is returned that is not wrapped in a node or anything like that, the output gets scattered all over my page... for example, the text Some output. appears above the navigation, Some more output. appears underneath the footer, etc.

By the way, the page-array has the returned markup (the $output from above) in this place: 

page['content']['system_main']['main']['#markup']


Whereas for example a typical article would have its #markup in

page['content']['system_main']['nodes'][$nid]['body'][0]['#markup']


So I guess drupal doesn't realize I would like my output to be in the content region?

Is there any way I can safely render that unpleasant html?

Thanks a lot in advance!!
Once again, the problem sat in front of the screen ;)

Like @rooby said, there was a mistake in the html returned. A missing &lt;/table&gt; tag messed up my layout. Adjusting this solved my problem. Thanks!!

But to be able to influence the layout of custom html a bit more generally, I did this:

When a module returns output without first passing it through a theme function, it ends up in page['content']['system_main']['main']['#markup'], whereas in a normal page, there would be no #markup on this level of the page array, only elements like node, pager, #block etc. So finding page['content']['system_main']['main']['#markup'] means some custom code has been returned by some custom module.

So in my theme's template.php, I implemented 

function mytheme_preprocess_page(&amp;$variables, $hook) {
    if ( $variables['page']['content']['system_main']['main']['#markup'] ){
        $variables['page']['content']['system_main']['main']['#markup'] = '&lt;div class="customcontent"&gt;' . $variables['page']['content']['system_main']['main']['#markup'] . '&lt;/div&gt;';
 }
}


Thank you guys very much! Always awesome how good the feedback in the drupal community is.