Contact Lifestream



NP_LatestComments

The script was just a constant layout accident waiting to happen. So instead of stripping tags blindly, i.e. $text = strip_tags($text); I did this.

$text = preg_replace( "/(?\s]+)/i", "", $text );
$text = strip_tags($text, '');
$text = preg_replace( "/
/", " ", $text );

There is probably a more clever way to do it, but then again I’m no PHP wiz. The end result is that anchors and http URLs are both axed. Line breaks are kept only to be replaced by spaces. Besides URLs breaking the right column layout, it was annoying to see how paragraphs were being joined with no space in-between.