--- trunk-svn/wp-includes/functions-formatting.php	Thu Mar  3 23:11:19 2005
+++ trunk/wp-includes/functions-formatting.php	Sat Mar  5 11:28:46 2005
@@ -1,6 +1,7 @@
 <?php
 
 function wptexturize($text) {
+	global $wpautocorrect;
 	$output = '';
 	// Capture tags and everything inside them
 	$textarr = preg_split("/(<.*>)/Us", $text, -1, PREG_SPLIT_DELIM_CAPTURE);
@@ -15,10 +16,9 @@
 			$curl = str_replace('...', '&#8230;', $curl);
 			$curl = str_replace('``', '&#8220;', $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");
-			$cockneyreplace = array("&#8217;tain&#8217;t","&#8217;twere","&#8217;twas","&#8217;tis","&#8217;twill","&#8217;til","&#8217;bout","&#8217;nuff","&#8217;round");
-			$curl = str_replace($cockney, $cockneyreplace, $curl);
+			// Replacement for cockneyreplace
+			// Array now set in wp-config.php or wp-includes/vars.php
+			$curl = str_replace( array_keys($wpautocorrect), array_values($wpautocorrect), $curl );
 
 			$curl = preg_replace("/'s/", '&#8217;s', $curl);
 			$curl = preg_replace("/'(\d\d(?:&#8217;|')?s)/", "&#8217;$1", $curl);
Only in trunk/wp-includes: languages
diff -u --recursive trunk-svn/wp-includes/vars.php trunk/wp-includes/vars.php
--- trunk-svn/wp-includes/vars.php	Thu Mar  3 23:11:19 2005
+++ trunk/wp-includes/vars.php	Sat Mar  5 11:26:17 2005
@@ -105,6 +105,21 @@
 	$wp_smiliesreplace[] = " <img src='" . get_settings('siteurl') . "/wp-images/smilies/$img' alt='$smiley_masked' class='wp-smiley' /> ";
 }
 
+// if the config file does not provide the autocorrect array, let's define it here
+if (!isset($wpautocorrect)) {
+	$wpautocorrect = array(
+	"'tain't" => '&#8217;tain&#8217;t',
+	"'twere"  => '&#8217;twere',
+	"'twas"   => '&#8217;twas',
+	"'tis"    => '&#8217;tis',
+	"'twill"  => '&#8217;twill',
+	"'til"    => '&#8217;til',
+	"'bout"   => '&#8217;bout',
+	"'nuff"   => '&#8217;nuff',
+	"'round"  => '&#8217;round',
+	);
+}
+
 // Path for cookies
 define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_settings('home') . '/' ) );
 define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_settings('siteurl') . '/' ) );
