From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4.0.6
PHP Bug Type:     Feature/Change Request
Bug description:  wordwrap() only for long words

The function wordwrap() could work in another fashion, breaking only words
bigger than the specified width instead of break all lines.

The web browsers always break text at spaces, fiting it in the web page.
But if a somebody post a message with very long words (example:
HEEEEEEEEEEEEEEEEEEEEEEEELLLLLLLLLLLLLOOOOOOOOOOOOOOOOOOOOOOOOOHOOOOWWWWWWWAREEEEEEEEEEEEEEEEEYOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOUUUUUUUUUUUUUUUUUUUUU????????????????????),
it will stretch the page, showing the horizontal scrollbar and making a
mess in the layout. 

With the actual wordwrap(), it will break all lines of text, so when I need
to use the nl2br(), the text will appear as a small column in the left.

I need to use ns2br(), or the posts will appear "compacted".
So, if wordwrap() break only long words at specified width that will depend
of my layout, everything will be fine. 

I think such behavior could work with a little differece in the cut
parameter.

-- 
Edit bug report at: http://bugs.php.net/?id=14643&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to