Index: /FCKeditor/branches/developers/alfonsoml/editor/filemanager/browser/default/frmresourceslist.html
===================================================================
--- /FCKeditor/branches/developers/alfonsoml/editor/filemanager/browser/default/frmresourceslist.html	(revision 382)
+++ /FCKeditor/branches/developers/alfonsoml/editor/filemanager/browser/default/frmresourceslist.html	(revision 383)
@@ -22,8 +22,6 @@
  * This page shows all resources available in a folder in the File Browser.
 -->
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-	<title>List of resources</title>
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 	<link href="browser.css" type="text/css" rel="stylesheet">
 	<script type="text/javascript" src="js/common.js"></script>
@@ -90,5 +88,5 @@
 function OpenFile( fileUrl )
 {
-	window.top.opener.SetUrl( fileUrl ) ;
+	window.top.opener.SetUrl( encodeURI( fileUrl ) ) ;
 	window.top.close() ;
 	window.top.opener.focus() ;
@@ -117,5 +115,5 @@
 	if ( oFolderNode == null )
 	{
-		alert( 'The server didn\'t reply with a proper XML file\r\nCheck your configuration.' ) ;
+		alert( 'The server didn\'t reply with a proper XML data. Please check your configuration.' ) ;
 		return ;
 	}
Index: /FCKeditor/branches/developers/alfonsoml/editor/filemanager/browser/default/js/fckxml.js
===================================================================
--- /FCKeditor/branches/developers/alfonsoml/editor/filemanager/browser/default/js/fckxml.js	(revision 382)
+++ /FCKeditor/branches/developers/alfonsoml/editor/filemanager/browser/default/js/fckxml.js	(revision 383)
@@ -62,16 +62,15 @@
 			if ( oXmlHttp.readyState == 4 )
 			{
-				if ( oXmlHttp.responseXML == null || oXmlHttp.responseXML.firstChild == null)
+				if ( ( oXmlHttp.status != 200 && oXmlHttp.status != 304 ) || oXmlHttp.responseXML == null || oXmlHttp.responseXML.firstChild == null )
 				{
-					alert( 'The server didn\'t send back a proper XML response.\r\n\r\n' +
-							'Requested URL: ' + urlToCall + '\r\n' +
-							'Response text:\r\n' + oXmlHttp.responseText ) ;
+					alert( 'The server didn\'t send back a proper XML response. Please contact your system administrator.\n\n' +
+							'XML request error: ' + oXmlHttp.statusText + ' (' + oXmlHttp.status + ')\n\n' +
+							'Requested URL:\n' + urlToCall + '\n\n' +
+							'Response text:\n' + oXmlHttp.responseText ) ;
 					return ;
 				}
+
 				oFCKXml.DOMDocument = oXmlHttp.responseXML ;
-				if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 )
-					asyncFunctionPointer( oFCKXml ) ;
-				else
-					alert( 'XML request error: ' + oXmlHttp.statusText + ' (' + oXmlHttp.status + ')' ) ;
+				asyncFunctionPointer( oFCKXml ) ;
 			}
 		}
Index: /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/php/basexml.php
===================================================================
--- /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/php/basexml.php	(revision 382)
+++ /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/php/basexml.php	(revision 383)
@@ -40,8 +40,8 @@
 
 	// Set the response format.
-	header( 'Content-Type:text/xml; charset=utf-8' ) ;
+	header( 'Content-Type: text/xml; charset=utf-8' ) ;
 }
 
-function CreateXmlHeader( $command, $resourceType, $currentFolder, $url )
+function CreateXmlHeader( $command, $resourceType, $currentFolder )
 {
 	SetXmlHeaders() ;
@@ -54,5 +54,7 @@
 
 	// Add the current folder node.
-	echo '<CurrentFolder path="' . ConvertToXmlAttribute( $currentFolder ) . '" url="' . ConvertToXmlAttribute( $url ) . '" />' ;
+	echo '<CurrentFolder path="' . ConvertToXmlAttribute( $currentFolder ) . '" url="' . ConvertToXmlAttribute( GetUrlFromPath( $resourceType, $currentFolder ) ) . '" />' ;
+
+	$GLOBALS['HeaderSent'] = true ;
 }
 
@@ -69,7 +71,16 @@
 	echo '<?xml version="1.0" encoding="utf-8" ?>' ;
 
-	echo '<Connector><Error number="' . $number . '" text="' . htmlspecialchars( $text ) . '" /></Connector>' ;
+	echo '<Connector>' ;
+	
+	SendErrorNode(  $number, $text ) ;
+	
+	echo '</Connector>' ;
 
 	exit ;
 }
+
+function SendErrorNode(  $number, $text )
+{
+	echo '<Error number="' . $number . '" text="' . htmlspecialchars( $text ) . '" />' ;
+}
 ?>
Index: /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/php/connector.php
===================================================================
--- /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/php/connector.php	(revision 382)
+++ /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/php/connector.php	(revision 383)
@@ -61,5 +61,5 @@
 	}
 
-	CreateXmlHeader( $sCommand, $sResourceType, $sCurrentFolder, GetUrlFromPath( $sResourceType, $sCurrentFolder, $sCommand ) ) ;
+	CreateXmlHeader( $sCommand, $sResourceType, $sCurrentFolder ) ;
 
 	// Execute the required command.
Index: /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/php/io.php
===================================================================
--- /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/php/io.php	(revision 382)
+++ /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/php/io.php	(revision 383)
@@ -73,5 +73,18 @@
 
 	// Ensure that the directory exists.
-	CreateServerFolder( $sResourceTypePath ) ;
+	$sErrorMsg = CreateServerFolder( $sResourceTypePath ) ;
+	if ( $sErrorMsg != '' )
+	{
+		if ( isset( $GLOBALS['HeaderSent'] ) && $GLOBALS['HeaderSent'] )
+		{ 
+			SendErrorNode( 1, "Error creating folder \"{$sResourceTypePath}\" ({$sErrorMsg})" ) ;
+			CreateXmlFooter() ;
+			exit ;
+		}
+		else
+		{
+			SendError( 1, "Error creating folder \"{$sResourceTypePath}\" ({$sErrorMsg})" ) ;
+		}
+	}
 
 	// Return the resource type directory combined with the required path.
@@ -98,5 +111,7 @@
 	if ( !file_exists( $sParent ) )
 	{
-		CreateServerFolder( $sParent ) ;
+		$sErrorMsg = CreateServerFolder( $sParent ) ;
+		if ( $sErrorMsg != '' )
+			return $sErrorMsg ;
 	}
 
@@ -121,8 +136,8 @@
 		ini_restore( 'error_reporting' ) ;
 
-		if ( $sErrorMsg != '') 
-				SendError("1", "CreateServerFolder(" . $folderPath . ") : " . $sErrorMsg);
-
-	}
+		return $sErrorMsg ;
+	}
+	else
+		return '' ;
 }
 
@@ -136,12 +151,12 @@
 	// Get the slash according to the filesystem
 	$slash = ( strpos( $sRealPath, '/' ) === false ) ? '\\' : '/' ;
-	$sSelfPath = str_replace('/', $slash, $sSelfPath) ;
+	$sSelfPath = str_replace( '/', $slash, $sSelfPath ) ;
 	
-	$position = strpos($sRealPath, $sSelfPath) ;
+	$position = strpos( $sRealPath, $sSelfPath ) ;
 
 	// This can check only that this script isn't run from a virtual dir
 	// But it avoids problems the problems that arise if it isn't checked
 	if ( $position === false || $position <> strlen( $sRealPath ) - strlen( $sSelfPath ) )
-		SendError( 1, "Sorry, can't map 'UserFilesPath' to a physical path. You must set the 'UserFilesAbsolutePath' value " . $position) ;
+		SendError( 1, 'Sorry, can\'t map "UserFilesPath" to a physical path. You must set the "UserFilesAbsolutePath" value in "editor/filemanager/connectors/php/config.php".' ) ;
 
 	return substr( $sRealPath, 0, $position ) ;
