General fix for trailing whitespace in messages, so that we don't have to put bugfix...
authorTim Starling <tstarling@users.mediawiki.org>
Thu, 4 Jun 2009 07:26:46 +0000 (07:26 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Thu, 4 Jun 2009 07:26:46 +0000 (07:26 +0000)
includes/MessageCache.php

index 7f5d95d..b831f33 100644 (file)
@@ -575,6 +575,16 @@ class MessageCache {
                if( $message === false ) {
                        return '&lt;' . htmlspecialchars($key) . '&gt;';
                }
+
+               # Fix whitespace
+               $message = strtr( $message, 
+                       array(
+                               # Fix for trailing whitespace, removed by textarea
+                               '&#32;' => ' ',
+                               # Fix for NBSP, converted to space by firefox
+                               '&nbsp;' => "\xc2\xa0",
+                       ) );
+
                return $message;
        }