File tree Expand file tree Collapse file tree 2 files changed +3
-25
lines changed
Expand file tree Collapse file tree 2 files changed +3
-25
lines changed Original file line number Diff line number Diff line change @@ -3804,31 +3804,13 @@ function is_email( $email, $deprecated = false ) {
38043804 * Converts to ASCII from email subjects.
38053805 *
38063806 * @since 1.2.0
3807+ * @deprecated {WP_VERSION} Use {@see rfc2047_decode()}.
38073808 *
38083809 * @param string $subject Subject line.
38093810 * @return string Converted string to ASCII.
38103811 */
38113812function wp_iso_descrambler ( $ subject ) {
3812- /* this may only work with iso-8859-1, I'm afraid */
3813- if ( ! preg_match ( '#\=\?(.+)\?Q\?(.+)\?\=#i ' , $ subject , $ matches ) ) {
3814- return $ subject ;
3815- }
3816-
3817- $ subject = str_replace ( '_ ' , ' ' , $ matches [2 ] );
3818- return preg_replace_callback ( '#\=([0-9a-f]{2})#i ' , '_wp_iso_convert ' , $ subject );
3819- }
3820-
3821- /**
3822- * Helper function to convert hex encoded chars to ASCII.
3823- *
3824- * @since 3.1.0
3825- * @access private
3826- *
3827- * @param array $matches The preg_replace_callback matches array.
3828- * @return string Converted chars.
3829- */
3830- function _wp_iso_convert ( $ matches ) {
3831- return chr ( hexdec ( strtolower ( $ matches [1 ] ) ) );
3813+ return rfc2047_decode ( $ subject );
38323814}
38333815
38343816/**
Original file line number Diff line number Diff line change 124124 $ subject = trim ( $ line );
125125 $ subject = substr ( $ subject , 9 , strlen ( $ subject ) - 9 );
126126 // Captures any text in the subject before $phone_delim as the subject.
127- if ( function_exists ( 'iconv_mime_decode ' ) ) {
128- $ subject = iconv_mime_decode ( $ subject , 2 , get_option ( 'blog_charset ' ) );
129- } else {
130- $ subject = wp_iso_descrambler ( $ subject );
131- }
127+ $ subject = rfc2047_decode ( $ subject );
132128 $ subject = explode ( $ phone_delim , $ subject );
133129 $ subject = $ subject [0 ];
134130 }
You can’t perform that action at this time.
0 commit comments