views:

44

answers:

2

Imagine if I have in a text something like [a href="this-is-a-very-big-link"]this is ok[/a] (switch < and > with [ and ])... And also this-is-a-very-big-word.

I need to cut the second case in two lines...

Notice wordwrap kills the link so it is not useful for solving this sort of problem.

Any idea?

+1  A: 

In CSS:

word-wrap: break-word;
Dereleased
A: 

Decided to use the breakLongWords() function found on the www.php.net/wordwrap

I know using word-wrap: break-word; would be better, but as I tried right now I saw that Firefox doesn't implement it yet, so I guess I'll have to keep it on the server-side...

Henrique Vicente