http://qs1969.pair.com?node_id=239409


in reply to Re: Re: catching newlines from textarea input
in thread catching newlines from textarea input

You may want to look at HTML::Entities instead of hand-rolling all your own entity encodings.