paragraph styling problem

hello ,

i have following content in my string .. str="<p>hiii</p> <p>&nbsp;</p> <p>rahul mehta</p>";

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

pleas help..

thanks

rahul

Paragraphs (<p>) 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 <p> 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