epic-s6ts
[kivitendo-erp.git] / js / dunning.js
index a98722e..9a794a9 100644 (file)
@@ -1,12 +1,13 @@
 function set_email_window(input_subject, input_body, input_attachment) {
   var parm = centerParms(800,600) + ",width=800,height=600,status=yes,scrollbars=yes";
   var url = "dn.pl?" +
+    "INPUT_ENCODING=UTF-8&" +
     "action=set_email&" +
-    "email_subject=" + escape_more(document.getElementsByName(input_subject)[0].value) + "&" +
-    "email_body=" + escape_more(document.getElementsByName(input_body)[0].value) + "&" +
-    "email_attachment=" + escape_more(document.getElementsByName(input_attachment)[0].value) + "&" +
-    "input_subject=" + escape_more(input_subject)  + "&" +
-    "input_body=" + escape_more(input_body)  + "&" +
-    "input_attachment=" + escape_more(input_attachment);
+    "email_subject=" + encodeURIComponent(document.getElementsByName(input_subject)[0].value) + "&" +
+    "email_body=" + encodeURIComponent(document.getElementsByName(input_body)[0].value) + "&" +
+    "email_attachment=" + encodeURIComponent(document.getElementsByName(input_attachment)[0].value) + "&" +
+    "input_subject=" + encodeURIComponent(input_subject)  + "&" +
+    "input_body=" + encodeURIComponent(input_body)  + "&" +
+    "input_attachment=" + encodeURIComponent(input_attachment);
   window.open(url, "_new_generic", parm);
 }