Index: /branches/2.3/expressoMail1_2/inc/class.ScriptS.inc.php
===================================================================
--- /branches/2.3/expressoMail1_2/inc/class.ScriptS.inc.php	(revision 4641)
+++ /branches/2.3/expressoMail1_2/inc/class.ScriptS.inc.php	(revision 4851)
@@ -507,10 +507,9 @@
         // Lê as regras fora do escritório;
         if ($this->newout != "") {
-            $newscriptfoot .= preg_replace("/[\\n\\r]/", " ", $this->newout) . "\n";
+            $newscriptfoot .= preg_replace("/[\\n\\r]/", "%0A", $this->newout) . "\n";
         }
         $newscriptfoot .= "#mode&&basic\n";
 
         $newscript = $newscripthead . $newscriptbody . $newscriptfoot;
-
         // Destroi as variaveis;
         unset($rule);
Index: /branches/2.3/expressoMail1_2/js/filters.js
===================================================================
--- /branches/2.3/expressoMail1_2/js/filters.js	(revision 4576)
+++ /branches/2.3/expressoMail1_2/js/filters.js	(revision 4851)
@@ -187,5 +187,5 @@
         {
 		var aux = outOffice.split("&&");
-		return get_lang("Rule") + " - <a href='javascript:void(0)' onclick=filter.form_out()> " + "<b>" + get_lang("Status") + " : </b><font color='red'>" + (aux[4] == "off" ? get_lang("Disabled") : get_lang("Enabled")) + "</font></a>";
+		return get_lang("Rule") + " - <a href='javascript:void(0)' onclick=filter.form_out()> " + "<b>" + get_lang("Status") + " : </b><font color='red'>" + (aux[4].replace("\n","") === "off" ? get_lang("Disabled") : get_lang("Enabled")) + "</font></a>";
 	}
 	
Index: /branches/2.3/expressoMail1_2/js/common_functions.js
===================================================================
--- /branches/2.3/expressoMail1_2/js/common_functions.js	(revision 4782)
+++ /branches/2.3/expressoMail1_2/js/common_functions.js	(revision 4851)
@@ -709,9 +709,9 @@
         }
     }
+    
     return strEncode;
 }
 
 function url_decode(str) {
-
 	var n, strCode, strDecode = "";
 	for (n = 0; n < str.length; n++) {
@@ -724,4 +724,18 @@
 	    //    strDecode += str.charAt(n);
 	    //}
+	}
+	return strDecode;
+}
+
+function url_decode_s(str) {
+	var n, strCode, strDecode = "";
+	for (n = 0; n < str.length; n++) {
+	    if (str.charAt(n) == "%") {
+	        strCode = str.charAt(n + 1) + str.charAt(n + 2);
+	        strDecode += String.fromCharCode(parseInt(strCode, 16));
+	        n += 2;
+	    } else {
+	        strDecode += str.charAt(n);
+	    }
 	}
 	return strDecode;
Index: /branches/2.3/expressoMail1_2/js/filter.js
===================================================================
--- /branches/2.3/expressoMail1_2/js/filter.js	(revision 4770)
+++ /branches/2.3/expressoMail1_2/js/filter.js	(revision 4851)
@@ -46,11 +46,12 @@
 		var cont1 = parseInt(0);
 		var cont2 = parseInt(0);
-	
+
 		if( _this.rulest.length == 0 )
 		{
 			var handler_sieve = function(data)
 			{
-				if (data.toString().indexOf('Error:') == 0) 
-				{
+				if(data.toString().indexOf('Error:') == 0) 
+				{
+
 					_this.criticalError = true;
 					alert(get_lang('The filters service is out of service, try again later...'));
@@ -68,12 +69,15 @@
 					}
 				}
-				_this.out_officeR = data.vacation[0];
-				_this.out_officeR = _this.out_officeR ? trim(_this.out_officeR.toString().replace("\n","")) : "";
-				if(data.mode.length > 0){_this.mode_in = data.mode[0];}
+                                if(typeof(data.vacation[0]) == 'undefined'){
+                                    _this.out_officeR = "";
+                                }
+                                else
+                                    _this.out_officeR = url_decode_s(data.vacation[0]);
 				}
 				catch(e){
 					_this.criticalError = true;
-					alert(get_lang('The filters service is out of service, try again later...'));
-				}
+					alert(get_lang('==> The filters service is out of service, try again later...'));
+				}
+				if(data.mode.length > 0){_this.mode_in = data.mode[0];}
 				if (typeof(posHandler) == 'function')  
 					posHandler(param);  
@@ -407,5 +411,5 @@
 	var createFilter = function (param){ 
 		if (filter.criticalError){ 
-			alert(get_lang('The filters service is out of service, try again later...')); 
+			alert(get_lang('The filters service is out of service, try again later...'));
 			return false; 
 		} 
@@ -454,5 +458,4 @@
 	
 	cfilter.prototype.delete_r = function(){
-	
 		// rule
 		var _this = this;
@@ -485,6 +488,7 @@
 				//Save outoffice in prefs:
                                 connector.loadScript("preferences");
-				if(typeof(prefe) == 'undefined')
+				if(typeof(prefe) == 'undefined'){
 					setTimeout("filter.delete_r();",500);
+                                }
 				else
 					prefe.save("outoffice", _this.out_officeF);
@@ -513,7 +517,7 @@
 				_this.rulesVoip[i] = aux;
 			}
-		} 
-
-		_this.reload_rules();
+		}
+                
+                _this.reload_rules()
 	}
 	
@@ -824,4 +828,5 @@
 	}
 
+    connector.loadScript("preferences");
 // build object
    var filter;
