diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index d1132bb642c..ffe22b580e7 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -936,10 +936,10 @@ class FormMail extends Form
$validpaymentmethod = getValidOnlinePaymentMethods($paymentmethod);
}
- var_dump($validpaymentmethod);
- if (count($validpaymentmethod) > 0)
+
+ if (count($validpaymentmethod) > 0 && $paymenturl)
{
- $this->substit['__ONLINE_PAYMENT_TEXT_AND_URL__']=($paymenturl?$langs->trans("PredefinedMailContentLink", $paymenturl):'');
+ $this->substit['__ONLINE_PAYMENT_TEXT_AND_URL__']=str_replace('\n',"\n",$langs->transnoentities("PredefinedMailContentLink", $paymenturl));
$this->substit['__ONLINE_PAYMENT_URL__']=$paymenturl;
}
else
@@ -963,7 +963,7 @@ class FormMail extends Form
$defaultmessage=str_replace('\n',"\n",$defaultmessage);
// Deal with format differences between message and signature (text / HTML)
- if(dol_textishtml($defaultmessage) && !dol_textishtml($this->substit['__USER_SIGNATURE__'])) {
+ if (dol_textishtml($defaultmessage) && !dol_textishtml($this->substit['__USER_SIGNATURE__'])) {
$this->substit['__USER_SIGNATURE__'] = dol_nl2br($this->substit['__USER_SIGNATURE__']);
} else if(!dol_textishtml($defaultmessage) && dol_textishtml($this->substit['__USER_SIGNATURE__'])) {
$defaultmessage = dol_nl2br($defaultmessage);
diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang
index 10ca033662d..8ef8cc30090 100644
--- a/htdocs/langs/en_US/other.lang
+++ b/htdocs/langs/en_US/other.lang
@@ -91,7 +91,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nYou will find here the shipping
PredefinedMailContentSendFichInter=__(Hello)__\n\nYou will find here the intervention __REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
-PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.
%s
+PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n
DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available.
ChooseYourDemoProfil=Choose the demo profile that best suits your needs...
ChooseYourDemoProfilMore=...or build your own profile
(manual module selection)