This is some of the nastiest code I've seen in a while. Striping out the CR/LF after they've been URL encoded? Why not just strip them *before* they've been encoded? With one line of code?