word search and wrap crisis
Posted: Wed May 14, 2003 10:09 pm
i have a forum and I would like to perform the following task:
when user post a message as follow:
"heydudehereisthephotoyouwouldliketoread...checkitoutheydudehereisthephotoyouwouldliketoread...checkitoutheydudehereisthephotoyouwouldliketoread...checkitoutheydudehereisthephotoyouwouldliketoread...checkitoutheydudehereisthephotoyouwouldliketoread...checkitout
<img src='http://www.sasi.co.za/saycheese/WCwallp ... 4.768).jpg'>
howdoyoulikeitpleaseletmeknowhowdoyoulikeitpleasel
etmeknowhowdoyoulikeitpleaseletmeknowhowdoyoulikei
tpleaseletmeknow."
I want the words to be in wordwrap where i did wordwrap function, but then if I want to post this picture, the wordwrap function will break the url of the picture with a % and hence, the picture will not be shown. I would like to write a function the will search each word in the messge and when it sees "http://" it will not wrap the area of "http://........." but the other words will be wrapped.
how do I do it?
when user post a message as follow:
"heydudehereisthephotoyouwouldliketoread...checkitoutheydudehereisthephotoyouwouldliketoread...checkitoutheydudehereisthephotoyouwouldliketoread...checkitoutheydudehereisthephotoyouwouldliketoread...checkitoutheydudehereisthephotoyouwouldliketoread...checkitout
<img src='http://www.sasi.co.za/saycheese/WCwallp ... 4.768).jpg'>
howdoyoulikeitpleaseletmeknowhowdoyoulikeitpleasel
etmeknowhowdoyoulikeitpleaseletmeknowhowdoyoulikei
tpleaseletmeknow."
I want the words to be in wordwrap where i did wordwrap function, but then if I want to post this picture, the wordwrap function will break the url of the picture with a % and hence, the picture will not be shown. I would like to write a function the will search each word in the messge and when it sees "http://" it will not wrap the area of "http://........." but the other words will be wrapped.
how do I do it?
