EDIT: Sorry, I was using an undefined variable. This bug was somewhere between the chair and the keyboard.
PHP is getting me frustrated with their (raw)urlencode function. I have an email form, and I'm trying to prepare for the mail function's failure by giving an error message which contains a mailto link. The link passes the subject and body to the email client via GET - admittedly not a critical feature, but AFAICT it should work perfectly.
My problem is that the newline characters (carriage return and linefeed) aren't encoded, even though they (0D and 0A) are included in 00-1F. I tried replacing them myself with their codes (%0d and %0a), but both str_replace and the other two functions just spit out an empty string when they hit these characters. That is, unless I type them directly into a double-quoted string.Originally Posted by http://www.faqs.org/rfcs/rfc1738
Does anyone have an idea for how to work around this? (I think this is the third PHP bug I've found since I finally fixed my computer a few days ago.)



Reply With Quote
Bookmarks