Index: /trunk/expressoMail1_2/inc/class.ScriptS.inc.php
===================================================================
--- /trunk/expressoMail1_2/inc/class.ScriptS.inc.php	(revision 4789)
+++ /trunk/expressoMail1_2/inc/class.ScriptS.inc.php	(revision 4855)
@@ -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: /trunk/expressoMail1_2/js/filters.js
===================================================================
--- /trunk/expressoMail1_2/js/filters.js	(revision 4735)
+++ /trunk/expressoMail1_2/js/filters.js	(revision 4855)
@@ -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: /trunk/expressoMail1_2/js/common_functions.js
===================================================================
--- /trunk/expressoMail1_2/js/common_functions.js	(revision 4843)
+++ /trunk/expressoMail1_2/js/common_functions.js	(revision 4855)
@@ -715,9 +715,9 @@
         }
     }
+    
     return strEncode;
 }
 
 function url_decode(str) {
-
 	var n, strCode, strDecode = "";
 	for (n = 0; n < str.length; n++) {
@@ -730,4 +730,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: /trunk/expressoMail1_2/js/filter.js
===================================================================
--- /trunk/expressoMail1_2/js/filter.js	(revision 4841)
+++ /trunk/expressoMail1_2/js/filter.js	(revision 4855)
@@ -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);  
@@ -320,6 +324,6 @@
 						"</tr><tr><td colspan='2'><hr size='1' width='100%'><b>"+get_lang("Action")+":</b></td></tr>"+
 						"</table><table id='table_rule1' border='0' cellpading='0' cellspacing='0' width='100%'>"+
-						 "<tr><td colspan='2'><input type='checkBox' id='checkBox2' onclick='filter.disable_radio();' name='checkb'>"+get_lang('Keep a copy of the message at your Inbox')+ "</td><tr>"+
-						 "<tr><td width='50%'><input type='radio' id='radio1' name='radio' value='folder'>"+get_lang('Store at')+".:</td>"+
+						"<tr><td colspan='2'><input type='checkBox' id='checkBox2' onclick='filter.disable_radio();' name='checkb'>"+get_lang('Keep a copy of the message at your Inbox')+ "</td><tr>"+
+						"<tr><td width='50%'><input type='radio' id='radio1' name='radio' value='folder'>"+get_lang('Store at')+".:</td>"+
 						"<td width='50%'><select id='select_mailboxes' name='select_mailboxes'></select></td>"+
 						"</tr><tr><td width='50%'><input type='radio' id='radio2' name='radio' value='address'>"+get_lang('Forward to the address')+".:</td>"+
@@ -406,5 +410,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; 
 		} 
@@ -453,5 +457,4 @@
 	
 	cfilter.prototype.delete_r = function(){
-	
 		// rule
 		var _this = this;
@@ -483,9 +486,10 @@
 				_this.out_officeF = false;
 				//Save outoffice in prefs:
-				connector.loadScript("preferences"); 
-                if(typeof(prefe) == 'undefined') 
-                        setTimeout("filter.delete_r();",500); 
-                else 
-                        prefe.save("outoffice", _this.out_officeF);
+                                connector.loadScript("preferences");
+				if(typeof(prefe) == 'undefined'){
+					setTimeout("filter.delete_r();",500);
+                                }
+				else
+					prefe.save("outoffice", _this.out_officeF);
 			}
 		}
@@ -512,6 +516,6 @@
 				_this.rulesVoip[i] = aux;
 			}
-		} 
-
+		}
+                
 		_this.reload_rules();
 	}
@@ -820,4 +824,5 @@
 	}
 
+    connector.loadScript("preferences");
 // build object
    var filter;
