This is pretty much the kind of thing we are looking for. But its mangled the href in the A tag for the BBC. Its essential that the wrapping text doesnt mess with the insides of tags or anything that HTML would normally render. So & cant be wrapped internally. Likewise anything inside of a tag should be left alone. (You can use /<[^>]+>/ for matching tags, we aren't that picky.)
Note that the content of the chatter has been preprocess before this code executes, so you dont need to worry about fake tags or anthing like that. If something is a valid tag it will match /<[^>]+>/ already. Anything that isnt valid will be modified to not match that pattern.
In reply to Re^2: A call to keyboards: Better chatterbox wrapping
by demerphq
in thread A call to keyboards: Better chatterbox wrapping
by demerphq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |