Advertisements

wp_iso_descrambler

Definition:
function wp_iso_descrambler($string) {}

Convert to ASCII from email subjects.

Parameters

  • string $string: Subject line

Return values

returns:Converted string to ASCII

Source code

function wp_iso_descrambler($string) {

	/* this may only work with iso-8859-1, I'm afraid */

	if (!preg_match('#\=\?(.+)\?Q\?(.+)\?\=#i', $string, $matches)) {

		return $string;

	} else {

		$subject = str_replace('_', ' ', $matches[2]);

		$subject = preg_replace_callback('#\=([0-9a-f]{2})#i', '_wp_iso_convert', $subject);

		return $subject;

	}

}

3803

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: