in reply to Replacing \n even when it shouldn't be :/
You might try to do that with a CPAN module ;) HTML::Clean::Human for example.
hth,PooLpi