You could replace "*" and "%" with let's say "{ASTERISK}" and "{PERCENT}" at the begining, before you start censoring, and at the end, when outputing, convert them back to the orignial characters, just an idea :)
sk89q - 2008-09-04 02:03:18 - In reply to message 1 from C Alex
I'll look into a way to put literal characters (maybe that, if I'm feeling lazy =)..). I rolled this for my own chat months ago, so I didn't bother putting in anything I didn't need.