ソースを参照

[communication] [fixes] escape script and style tags

version-14
Anand Doshi 12年前
コミット
f1f2a7b740
2個のファイルの変更7行の追加6行の削除
  1. +3
    -2
      core/doctype/communication/communication.js
  2. +4
    -4
      public/js/wn/views/communication.js

+ 3
- 2
core/doctype/communication/communication.js ファイルの表示

@@ -17,6 +17,9 @@ cur_frm.cscript.onload = function(doc) {
cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query; cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query;
cur_frm.fields_dict.supplier.get_query = erpnext.utils.supplier_query; cur_frm.fields_dict.supplier.get_query = erpnext.utils.supplier_query;
if(doc.content)
doc.content = wn.utils.escape_script_and_style(doc.content);
} }


cur_frm.cscript.refresh = function(doc, dt, dn) { cur_frm.cscript.refresh = function(doc, dt, dn) {
@@ -29,8 +32,6 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
}); });
if(hide_list.length < field_list.length) hide_field(hide_list); if(hide_list.length < field_list.length) hide_field(hide_list);
doc.content = wn.utils.escape_script_and_style(doc.content);
} }
} }




+ 4
- 4
public/js/wn/views/communication.js ファイルの表示

@@ -228,13 +228,13 @@ wn.views.CommunicationComposer = Class.extend({
return $(element).attr("data-file-name"); return $(element).attr("data-file-name");
}) })
// if(form_values.attach_document_print) {
if(form_values.attach_document_print) {
_p.build(form_values.select_print_format || "", function(print_format_html) { _p.build(form_values.select_print_format || "", function(print_format_html) {
me.send_email(btn, form_values, selected_attachments, print_format_html); me.send_email(btn, form_values, selected_attachments, print_format_html);
}); });
// } else {
// me.send_email(btn, form_values, selected_attachments);
// }
} else {
me.send_email(btn, form_values, selected_attachments);
}
}); });
}, },


読み込み中…
キャンセル
保存