* Removed the troublesome regular expression in isValidEmailAddr which returns
[lhc/web/wiklou.git] / includes / SpecialExport.php
index 1101e4f..fa4424f 100644 (file)
@@ -67,8 +67,8 @@ function pages2xml( $pages, $curonly = false ) {
        wfProfileIn( $fname );
        
        global $wgContLanguageCode, $wgInputEncoding, $wgContLang;
-       $xml = "<" . "?xml version=\"1.0\" encoding=\"UTF-8\" ?" . ">\n" .
-               "<mediawiki version=\"0.1\" xml:lang=\"$wgContLanguageCode\">\n";
+       $xml = '<?xml version="1.0" encoding="UTF-8" ?>' . "\n" .
+               '<mediawiki version="0.1" xml:lang="' . $wgContLanguageCode . '">' . "\n";
        foreach( $pages as $page ) {
                $xml .= page2xml( $page, $curonly );
        }
@@ -186,19 +186,10 @@ function xmlsafe( $string ) {
         * Invalid UTF-8 sequences or forbidden control characters will make our
         * XML output invalid, so be sure to strip them out.
         */
-       global $wgUseLatin1;
-       if( $wgUseLatin1 ) {
-               /**
-                * We know the UTF-8 is valid since we converted outselves.
-                * Just check for forbidden controls...
-                */
-               $string = preg_replace( '/[\x00-\x08\x0b-\x1f]/', '', $string );
-       } else {
-               $string = UtfNormal::cleanUp( $string );
-       }
+       $string = UtfNormal::cleanUp( $string );
        
        $string = htmlspecialchars( $string );
        wfProfileOut( $fname );
        return $string;
 }
-?>
\ No newline at end of file
+?>