Changeset 907
- Timestamp:
- 02/22/2004 12:31:25 AM (21 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions-formatting.php
r876 r907 376 376 } 377 377 378 379 // used by wp-mail to handle charsets in email subjects 380 381 function wp_iso_descrambler($string) { 382 /* this may only work with iso-8859-1, I'm afraid */ 383 if (!preg_match('#\=\?(.+)\?Q\?(.+)\?\=#i', $string, $matches)) { 384 return $string; 385 } else { 386 $subject = str_replace('_', ' ', $matches[2]); 387 $subject = preg_replace('#\=([0-9a-f]{2})#ei', "chr(hexdec(strtolower('$1')))", $subject); 388 return $subject; 389 } 390 } 391 378 392 ?> -
trunk/wp-mail.php
r771 r907 74 74 $subject = trim($line); 75 75 $subject = substr($subject, 9, strlen($subject)-9); 76 if (!preg_match('#\=\?(.+)\?Q\?(.+)\?\=#i', $subject)) { 77 $subject = wp_iso_descrambler($subject); 78 } 76 79 if ($use_phoneemail) { 77 80 $subject = explode($phoneemail_separator, $subject);
Note: See TracChangeset
for help on using the changeset viewer.