the urls are in the form of....
chat.pl?text="some text?"
or perhaps even....
chat.pl?text="some%20text?"
Here is what I have so far, problem is it filters out the spaces in the text.
$text = param('text'); # Get text
$text =~ s/[^A-Za-z0-9_?]//g;
Commenting out the regex fixes that but creates other problems. Namely it leaves "" at the end of the string and puts newlines where there should be spaces, I think its to do with escape codes.
What I need is to keep every character bar newline. People often enter URLs, smilies etc into chat.