1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

in custom design fails if there are line breaks

This commit is contained in:
Hillel Coren 2017-06-13 21:15:06 +03:00
parent 00fd8e1718
commit 05ee7f0f5c
3 changed files with 5 additions and 2 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -98,6 +98,9 @@ function GetPdfMake(invoice, javascript, callback) {
return val; return val;
} }
// escape new lines
javascript = javascript.replace(/\n/g, "\\n").replace(/\r/g, "\\r");
// Add ninja logo to the footer // Add ninja logo to the footer
var dd = JSON.parse(javascript, jsonCallBack); var dd = JSON.parse(javascript, jsonCallBack);
var designId = invoice.invoice_design_id; var designId = invoice.invoice_design_id;