Revert r55842 "Can now pass in element attributes other than just id to buildTable...
[lhc/web/wiklou.git] / includes / Block.php
index b62fceb..5c2b52f 100644 (file)
@@ -826,7 +826,7 @@ class Block {
         * Convert a DB-encoded expiry into a real string that humans can read.
         *
         * @param $encoded_expiry String: Database encoded expiry time
-        * @return String
+        * @return Html-escaped String
         */
        public static function formatExpiry( $encoded_expiry ) {
                static $msg = null;
@@ -844,8 +844,9 @@ class Block {
                        $expirystr = $msg['infiniteblock'];
                } else {
                        global $wgLang;
-                       $expiretimestr = $wgLang->timeanddate( $expiry, true );
-                       $expirystr = wfMsgReplaceArgs( $msg['expiringblock'], array($expiretimestr) );
+                       $expiredatestr = htmlspecialchars($wgLang->date( $expiry, true ));
+                       $expiretimestr = htmlspecialchars($wgLang->time( $expiry, true ));
+                       $expirystr = wfMsgReplaceArgs( $msg['expiringblock'], array( $expiredatestr, $expiretimestr ) );
                }
                return $expirystr;
        }