Paragraph styling problem

hello ,

i have following content in my string …
str="

hiii

 

rahul mehta

";

i want to show first 150 character in a single line how i cant show it

pleas help…

thanks

rahul

Paragraphs (

) are printed on new lines, that’s how HTML works.
If you dont want that, dont use paragraphs.

hii

actually m using tinymce editor so

tag is automatically created so
i cant remove them, is there is any other way.

thanks

There exists a ruby library for HTML sanitizing, which would solve
your issue:
http://wonko.com/post/sanitize