)/Us", $text, -1, PREG_SPLIT_DELIM_CAPTURE);
	$stop = count($textarr);
	$skip = 0; // loop stuff
	for($i = 0; $i < $stop; $i++) {
		$curl = $textarr [$i];
		
		if (isset($curl {0}) && '<' != $curl {0} && $skip == 0) { // If it's not a tag
			$curl = str_replace('---', '—', $curl);
			$curl = str_replace(' -- ', ' — ', $curl);
			$curl = str_replace('--', '–', $curl);
			$curl = str_replace('xn–', 'xn--', $curl);
			$curl = str_replace('...', '…', $curl);
			$curl = str_replace('``', '“', $curl);
			
			// This is a hack, look at this more later. It works pretty well though.
			$cockney = array(
				"'tain't",
				"'twere",
				"'twas",
				"'tis",
				"'twill",
				"'til",
				"'bout",
				"'nuff",
				"'round",
				"'cause"
			);
			$cockneyreplace = array(
				"’tain’t",
				"’twere",
				"’twas",
				"’tis",
				"’twill",
				"’til",
				"’bout",
				"’nuff",
				"’round",
				"’cause"
			);
			$curl = str_replace($cockney, $cockneyreplace, $curl);
			
			$curl = preg_replace("/'s/", '’s', $curl);
			$curl = preg_replace("/'(\d\d(?:’|')?s)/", "’$1", $curl);
			$curl = preg_replace('/(\s|\A|")\'/', '$1‘', $curl);
			// $curl = preg_replace('/(\d+)"/', '$1″', $curl);
			
			$curl = preg_replace('/(\s|\A)("|")(?!\s)/', '$1“$3', $curl);
			
			$curl = preg_replace("/(\d+)'/", '$1′', $curl);
			$curl = preg_replace("/(\S)'([^'\s])/", "$1’$2", $curl);
			// $curl = preg_replace('/(\s|\A)"(?!\s)/', '$1“$2', $curl);
			
			$curl = preg_replace('/(\s|\A)("|")(?!\s)/', '$1“$3', $curl);
			
			$curl = preg_replace('/("|")(\s|\S|\Z)/', '”$2', $curl);
			$curl = preg_replace("/'([\s.]|\Z)/", '’$1', $curl);
			$curl = preg_replace("/ \(tm\)/i", ' ™', $curl);
			$curl = str_replace("''", '”', $curl);
			
			$curl = preg_replace('/(\d+)x(\d+)/', "$1×$2", $curl);
		} elseif (strstr($curl, '') || strstr($curl, '/>')) {
			if ($skip > 0)
				$skip--;
		} elseif (strstr($curl, ' 0)
				$skip++;
		}
		$curl = preg_replace('/&([^#])(?![a-z12]{1,8};)/', '&$1', $curl);
		$output .= $curl;
	}
	return $output;
}
function clean_pre($matches) {
	if (is_array($matches))
		$text = $matches [1] . $matches [2] . "";
	else
		$text = $matches;
	
	/* NWM: a bit hackish? where are the slashes for double quotes added? */
	$text = str_replace('\"', '"', $text);
	$text = str_replace('', "\n", $text);
	$text = str_replace('
', '', $text);
	return $text;
}
/**
 * Replaces double line-breaks with paragraph elements.
 *
 * A group of regex replaces used to identify text formatted with newlines and
 * replace double line-breaks with HTML paragraph tags. The remaining
 * line-breaks after conversion become <]*)>\s*|', "' . trim($tinkle, "\n") . "
\n";
	$pee = preg_replace('|\s*
|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace
	$pee = preg_replace('!([^<]+)(div|address|form)>!', "
$1
$2>", $pee);
	$pee = preg_replace('!\s*(?' . $allblocks . '[^>]*>)\s*
!', "$1", $pee); // don't pee all over a tag
	$pee = preg_replace("|(
|", "$1", $pee); // problem with nested lists
	$pee = preg_replace('|
]*)>|i', "", $pee);
	$pee = str_replace('
   
', '', $pee);
	$pee = preg_replace('!\s*(?' . $allblocks . '[^>]*>)!', "$1", $pee);
	$pee = preg_replace('!(?' . $allblocks . '[^>]*>)\s*
!', "$1", $pee);
	if ($br) {
		$pee = preg_replace_callback('/<(script|style).*?<\/\\1>/s', '_autop_newline_preservation_helper', $pee);
		$pee = preg_replace('|(?)\s*\n|', "]*>)(.*?) !is', 'clean_pre', $pee);
	$pee = preg_replace("|\n$|", '', $pee);
	
	return $pee;
}
/**
 * Newline preservation help function for wpautop
 *
 * @since 3.1.0
 * @access private
 * @param array $matches
 *        	preg_replace_callback matches array
 * @returns string
 */
function _autop_newline_preservation_helper($matches) {
	return str_replace("\n", "(.+?)<\/title>/', '', $content);
	$content = preg_replace('/(.+?)<\/category>/', '', $content);
	
	// Converts lone & characters into & (a.k.a. &)
	$content = preg_replace('/&([^#])(?![a-z]{1,8};)/i', '&$1', $content);
	
	// Fix Word pasting
	$content = strtr($content, $wp_htmltranswinuni);
	
	// Just a little XHTML help
	$content = str_replace('