The wpautop()
function will automatically convert line endings to <p>
tags. You can read more about it here.
<?php $metacontenido = get_post_meta($postid, 'ofertacontenido', true);
if($metacontenido != $empty) { wpautop($metacontenido); } ?>