For everyone else, the error is similar to how a SQL injection works.
A) Someone's name is: John 'Jack' Jerry
B) Using your example as a reference, a line of code might look something like:
if (strpos($_POST['userName'])
C) What the computer sees is this:
if (strpos($_POST['John 'Jack' Jerry']
D) So what happens is that the computer sees everything in between the single quotes as what it's looking for. So it ends up looking for "John " and " Jerry", and then depending on the language Jack does... something or nothing. So it basically tries to send a PM to John and Jerry, but not John 'Jack' Jerry.
Actually, no. I don't mean to burst your bubble (I thought along the same lines for quite a while) but that only works with SQL. PHP has security against that, and you'll be perfectly fine with a username such as "John 'Jack' Jerry".
Why?
MySQL is its own software based on PHP and other programming languages. It is built into the program, so it has to accept the programs' limitations.
PHP doesn't interpret
if (strpos($_POST['John 'Jack' Jerry'])) like that. Instead, it sees it as
if function strpos() returns true on on the $_POST variable which is equal to John 'Jack' Jerry, do whateverMySQL, on the other hand, can't work that way. MySQL is based on queries. If you wrote the above code into a PHP script, you'd have problems, but user input won't mess anything up. In MySQL user input IS the script, so you WILL have issues.
Hope that makes sense.

If you want my input, I think limiting some special characters is a fine idea, but you should allow quotes, underscores, hyphens, and maybe even !@#$%^&*()_+, as they are accessible on nearly all keyboards.