forked from Wavyzz/dolibarr
Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/core/lib/functions.lib.php htdocs/langs/en_US/bills.lang
This commit is contained in:
@@ -5662,11 +5662,12 @@ function picto_required()
|
|||||||
* @param integer $removelinefeed 1=Replace all new lines by 1 space, 0=Only ending new lines are removed others are replaced with \n, 2=Ending new lines are removed but others are kept with a same number of \n than nb of <br> when there is both "...<br>\n..."
|
* @param integer $removelinefeed 1=Replace all new lines by 1 space, 0=Only ending new lines are removed others are replaced with \n, 2=Ending new lines are removed but others are kept with a same number of \n than nb of <br> when there is both "...<br>\n..."
|
||||||
* @param string $pagecodeto Encoding of input/output string
|
* @param string $pagecodeto Encoding of input/output string
|
||||||
* @param integer $strip_tags 0=Use internal strip, 1=Use strip_tags() php function (bugged when text contains a < char that is not for a html tag)
|
* @param integer $strip_tags 0=Use internal strip, 1=Use strip_tags() php function (bugged when text contains a < char that is not for a html tag)
|
||||||
|
* @param integer $removedoublespaces Replace double space into one space
|
||||||
* @return string String cleaned
|
* @return string String cleaned
|
||||||
*
|
*
|
||||||
* @see dol_escape_htmltag() strip_tags() dol_string_onlythesehtmltags() dol_string_neverthesehtmltags(), dolStripPhpCode()
|
* @see dol_escape_htmltag() strip_tags() dol_string_onlythesehtmltags() dol_string_neverthesehtmltags(), dolStripPhpCode()
|
||||||
*/
|
*/
|
||||||
function dol_string_nohtmltag($stringtoclean, $removelinefeed = 1, $pagecodeto = 'UTF-8', $strip_tags = 0)
|
function dol_string_nohtmltag($stringtoclean, $removelinefeed = 1, $pagecodeto = 'UTF-8', $strip_tags = 0, $removedoublespaces = 1)
|
||||||
{
|
{
|
||||||
if ($removelinefeed == 2) $stringtoclean = preg_replace('/<br[^>]*>(\n|\r)+/ims', '<br>', $stringtoclean);
|
if ($removelinefeed == 2) $stringtoclean = preg_replace('/<br[^>]*>(\n|\r)+/ims', '<br>', $stringtoclean);
|
||||||
$temp = preg_replace('/<br[^>]*>/i', "\n", $stringtoclean);
|
$temp = preg_replace('/<br[^>]*>/i', "\n", $stringtoclean);
|
||||||
@@ -5685,13 +5686,16 @@ function dol_string_nohtmltag($stringtoclean, $removelinefeed = 1, $pagecodeto =
|
|||||||
// $temp after pass 2: 0000-021
|
// $temp after pass 2: 0000-021
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove also CR LF
|
$temp = dol_html_entity_decode($temp, ENT_COMPAT, $pagecodeto);
|
||||||
|
|
||||||
|
// Remove also carriage returns
|
||||||
if ($removelinefeed == 1) $temp = str_replace(array("\r\n", "\r", "\n"), " ", $temp);
|
if ($removelinefeed == 1) $temp = str_replace(array("\r\n", "\r", "\n"), " ", $temp);
|
||||||
|
|
||||||
// and double spaces
|
// And double quotes
|
||||||
while (strpos($temp, " "))
|
if ($removedoublespaces) {
|
||||||
{
|
while (strpos($temp, " ")) {
|
||||||
$temp = str_replace(" ", " ", $temp);
|
$temp = str_replace(" ", " ", $temp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return trim($temp);
|
return trim($temp);
|
||||||
|
|||||||
@@ -577,3 +577,6 @@ UnitPriceXQtyLessDiscount=Unit price x Qty - Discount
|
|||||||
CustomersInvoicesArea=Customer billing area
|
CustomersInvoicesArea=Customer billing area
|
||||||
SupplierInvoicesArea=Supplier billing area
|
SupplierInvoicesArea=Supplier billing area
|
||||||
FacParentLine=Invoice Line Parent
|
FacParentLine=Invoice Line Parent
|
||||||
|
SituationTotalRayToRest=Remainder to pay without taxe
|
||||||
|
PDFSituationTitle=Situation n° %d
|
||||||
|
SituationTotalProgress=Total progress %d %%
|
||||||
|
|||||||
@@ -575,3 +575,6 @@ BILL_SUPPLIER_DELETEInDolibarr=Facture fournisseur supprimée
|
|||||||
UnitPriceXQtyLessDiscount=Prix unitaire x Qté - Remise
|
UnitPriceXQtyLessDiscount=Prix unitaire x Qté - Remise
|
||||||
CustomersInvoicesArea=Zone de facturation client
|
CustomersInvoicesArea=Zone de facturation client
|
||||||
SupplierInvoicesArea=Zone de facturation fournisseur
|
SupplierInvoicesArea=Zone de facturation fournisseur
|
||||||
|
SituationTotalRayToRest=Reste à payer total HT
|
||||||
|
PDFSituationTitle=Situation n° %d
|
||||||
|
SituationTotalProgress=Total progression %d %%
|
||||||
|
|||||||
Reference in New Issue
Block a user