When you get an invalid input error, it usually means there is an illegal character is in the input. I have been caught out before with either a leading or trailing space.
Copy and paste the text to something like notepad. Save it with an encoding of ANSI (or ASCII, depending on your editor) to strip out unicode charcaters.

Double-check there are no trailing spaces, and then copy and paste it back in again.