diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 4135e982d14..3cc0aa41007 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -189,9 +189,9 @@ class AccountingJournal extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowAccountingJournal"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; $linkclose .= ' class="classfortooltip"'; } diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index f8573c3f75e..f34694ef5bc 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -529,9 +529,9 @@ class BookKeeping extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowTransaction"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/adherents/admin/member.php b/htdocs/adherents/admin/member.php index b8d13a37377..8bd3a2013ea 100644 --- a/htdocs/adherents/admin/member.php +++ b/htdocs/adherents/admin/member.php @@ -469,7 +469,7 @@ foreach ($dirmodels as $reldir) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'contract').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index a401823fc3c..42c1f192825 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2382,9 +2382,9 @@ class Adherent extends CommonObject if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $langs->load("users"); $label = $langs->trans("ShowUser"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 2947f20b158..cf33af23343 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -780,7 +780,7 @@ class AdherentType extends CommonObject } } $linkstart = ''; $linkend = ''; diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index c6aad6f2e1c..18b5dff4645 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -421,7 +421,7 @@ foreach ($dirmodels as $reldir) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/bom.php b/htdocs/admin/bom.php index 484547fbcfe..1c28ed4c482 100644 --- a/htdocs/admin/bom.php +++ b/htdocs/admin/bom.php @@ -428,7 +428,7 @@ foreach ($dirmodels as $reldir) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index f60f8cb8d44..cf91b5fb5cb 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -464,7 +464,7 @@ foreach ($dirmodels as $reldir) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/delivery.php b/htdocs/admin/delivery.php index 8cbc9a19cf3..f8d6c1730ad 100644 --- a/htdocs/admin/delivery.php +++ b/htdocs/admin/delivery.php @@ -464,7 +464,7 @@ if (getDolGlobalString('MAIN_SUBMODULE_DELIVERY')) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index 45c74c98523..3fcfa7c7b36 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -416,7 +416,7 @@ foreach ($dirmodels as $reldir) { if ($module->type == 'pdf') { print 'scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index 65434761dfb..31087976ffc 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -435,7 +435,7 @@ foreach ($dirmodels as $reldir) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index 1da1132f262..9e04a9894da 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -511,7 +511,7 @@ foreach ($dirmodels as $reldir) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php index d8c7cc97a76..18b7ac33f6d 100644 --- a/htdocs/admin/holiday.php +++ b/htdocs/admin/holiday.php @@ -427,7 +427,7 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/hrm.php b/htdocs/admin/hrm.php index d94d434ed8b..6671a5b68ad 100644 --- a/htdocs/admin/hrm.php +++ b/htdocs/admin/hrm.php @@ -479,7 +479,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/invoice.php b/htdocs/admin/invoice.php index 3a616082823..736078cd4cf 100644 --- a/htdocs/admin/invoice.php +++ b/htdocs/admin/invoice.php @@ -616,7 +616,7 @@ foreach ($dirmodels as $reldir) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/knowledgemanagement.php b/htdocs/admin/knowledgemanagement.php index dccddf00291..ffd63bb379c 100644 --- a/htdocs/admin/knowledgemanagement.php +++ b/htdocs/admin/knowledgemanagement.php @@ -597,7 +597,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/mrp.php b/htdocs/admin/mrp.php index 9a55acfe90f..bf7c39d8b9a 100644 --- a/htdocs/admin/mrp.php +++ b/htdocs/admin/mrp.php @@ -425,7 +425,7 @@ foreach ($dirmodels as $reldir) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/order.php b/htdocs/admin/order.php index ebad20367b1..d915eda1693 100644 --- a/htdocs/admin/order.php +++ b/htdocs/admin/order.php @@ -517,7 +517,7 @@ foreach ($dirmodels as $reldir) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/paymentbybanktransfer.php b/htdocs/admin/paymentbybanktransfer.php index 419a8b96384..a4771a9013b 100644 --- a/htdocs/admin/paymentbybanktransfer.php +++ b/htdocs/admin/paymentbybanktransfer.php @@ -362,7 +362,7 @@ foreach ($dirmodels as $reldir) } else { - print img_object($langs->trans("PreviewNotAvailable"),'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"),'generic'); } print ''; diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 702e1a77d4f..90a150ba6bc 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -377,7 +377,7 @@ foreach ($dirmodels as $reldir) } else { - print img_object($langs->trans("PreviewNotAvailable"),'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"),'generic'); } print ''; diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index 5b68c10a838..49ca75ee0a1 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -494,7 +494,7 @@ foreach ($dirmodels as $reldir) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/reception_setup.php b/htdocs/admin/reception_setup.php index 88dc292538b..7c1c855dc0a 100644 --- a/htdocs/admin/reception_setup.php +++ b/htdocs/admin/reception_setup.php @@ -429,7 +429,7 @@ foreach ($dirmodels as $reldir) { if ($module->type == 'pdf') { print 'scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 7e87218c977..78590db9795 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -664,7 +664,7 @@ foreach ($dirmodels as $reldir) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/stocktransfer.php b/htdocs/admin/stocktransfer.php index 4b5b7e3ad8e..e1281c1bf58 100644 --- a/htdocs/admin/stocktransfer.php +++ b/htdocs/admin/stocktransfer.php @@ -481,7 +481,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'generic').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index 51422388cd4..4c3fc9ee12c 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -483,7 +483,7 @@ foreach ($dirmodels as $reldir) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php index a67844e31bc..1ae98d5a5ec 100644 --- a/htdocs/admin/ticket.php +++ b/htdocs/admin/ticket.php @@ -489,7 +489,7 @@ foreach ($dirmodels as $reldir) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index bbc06499e6e..0c957617ce1 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -163,9 +163,9 @@ print ''; print ''; print ''.$langs->trans("UserMailRequired").''; -print ' '; +print ' '; -print ''; +print ''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('USER_MAIL_REQUIRED'); } else { @@ -181,9 +181,9 @@ print ''; print ''; print ''.$langs->trans("UserHideInactive").''; -print ' '; +print ' '; -print ''; +print ''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('USER_HIDE_INACTIVE_IN_COMBOBOX'); } else { @@ -325,7 +325,7 @@ foreach ($dirmodels as $reldir) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/usergroup.php b/htdocs/admin/usergroup.php index b9fb8c42608..fbaa912385a 100644 --- a/htdocs/admin/usergroup.php +++ b/htdocs/admin/usergroup.php @@ -244,7 +244,7 @@ foreach ($dirmodels as $reldir) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/workstation.php b/htdocs/admin/workstation.php index 7a346161188..f05467d68da 100644 --- a/htdocs/admin/workstation.php +++ b/htdocs/admin/workstation.php @@ -474,7 +474,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'generic').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/asset/admin/setup.php b/htdocs/asset/admin/setup.php index 963f7837314..22e36b47bda 100644 --- a/htdocs/asset/admin/setup.php +++ b/htdocs/asset/admin/setup.php @@ -447,7 +447,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 9dc62995ffc..75566f379a7 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -1408,9 +1408,9 @@ class Asset extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowAsset"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/asset/class/assetmodel.class.php b/htdocs/asset/class/assetmodel.class.php index 753b89a4a35..56852c052d6 100644 --- a/htdocs/asset/class/assetmodel.class.php +++ b/htdocs/asset/class/assetmodel.class.php @@ -619,9 +619,9 @@ class AssetModel extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowAssetModel"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index b6fa70ade31..f204993c892 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -1159,9 +1159,9 @@ class BOM extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowBillOfMaterials"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/bom/class/bomline.class.php b/htdocs/bom/class/bomline.class.php index 92328b09fcd..5ebd98a756c 100644 --- a/htdocs/bom/class/bomline.class.php +++ b/htdocs/bom/class/bomline.class.php @@ -387,9 +387,9 @@ class BOMLine extends CommonObjectLine if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowBillOfMaterialsLine"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/bookcal/class/availabilities.class.php b/htdocs/bookcal/class/availabilities.class.php index 1c5b7c78424..d072343caae 100644 --- a/htdocs/bookcal/class/availabilities.class.php +++ b/htdocs/bookcal/class/availabilities.class.php @@ -756,9 +756,9 @@ class Availabilities extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowAvailabilities"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/bookcal/class/calendar.class.php b/htdocs/bookcal/class/calendar.class.php index a1acf818ba9..c96fbe2da34 100644 --- a/htdocs/bookcal/class/calendar.class.php +++ b/htdocs/bookcal/class/calendar.class.php @@ -742,9 +742,9 @@ class Calendar extends CommonObject if (empty($notooltip)) { if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowCalendar"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index a386876a7d6..f58d1839389 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -319,9 +319,9 @@ class Bookmark extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowBookmark"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 09e0cb52c47..21a642afd22 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1811,9 +1811,9 @@ class Categorie extends CommonObject if (empty($notooltip)) { if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.' '.$forced_color.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ' class="'.$forced_color.($morecss ? ' '.$morecss : '').'"'; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 249e342d5fc..a96ec4e0e82 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1658,6 +1658,7 @@ class ActionComm extends CommonObject $datas['note'] .= (dol_textishtml($texttoshow) ? str_replace(array("\r", "\n"), "", $texttoshow) : str_replace(array("\r", "\n"), '
', $texttoshow)); $datas['note'] .= ''; } + // show categories for this record only in ajax to not overload lists if (isModEnabled('category') && !$nofetch) { require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; @@ -1767,6 +1768,7 @@ class ActionComm extends CommonObject $tooltip .= (dol_textishtml($texttoshow) ? str_replace(array("\r", "\n"), "", $texttoshow) : str_replace(array("\r", "\n"), '
', $texttoshow)); $tooltip .= ''; } + $linkclose = ''; $classfortooltip = 'classfortooltip'; $dataparams = ''; @@ -1784,9 +1786,9 @@ class ActionComm extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowAction"); - $linkclose .= ' alt="'.dol_escape_htmltag($tooltip, 1).'"'; + $linkclose .= ' alt="'.dolPrintHTMLForAttribute($tooltip).'"'; } - $linkclose .= ($tooltip ? ' title="'.dol_escape_htmltag($tooltip, 1).'"' : ' title="tocomplete"'); + $linkclose .= ($tooltip ? ' title="'.dolPrintHTMLForAttribute($tooltip).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classname.' '.$classfortooltip.'"'; } else { $linkclose .= ' class="'.$classname.'"'; diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index facaec0753f..d86745f21e9 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -852,9 +852,9 @@ class Mailing extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowEMailing"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 6c4b0d8413a..c8689e9f904 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -3831,9 +3831,9 @@ class Propal extends CommonObject if (empty($notooltip) && $user->hasRight('propal', 'lire')) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("Proposal"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index b3b59879276..6a7418d81ca 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3899,9 +3899,9 @@ class Commande extends CommonOrder if (empty($notooltip) && $user->hasRight('commande', 'lire')) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("Order"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; $target_value = array('_self', '_blank', '_parent', '_top'); diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 73ee30a83fe..37050661838 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1597,9 +1597,9 @@ class Account extends CommonObject if (empty($notooltip)) { if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("BankAccount"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 1fa01691f34..b474592d93d 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -724,9 +724,9 @@ class PaymentVarious extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php index d2bbbf5b545..0e71db22c62 100644 --- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php +++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php @@ -463,9 +463,9 @@ class CashControl extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 91eb3f25145..62eb4464566 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2109,9 +2109,9 @@ class Facture extends CommonInvoice if (empty($notooltip) && $user->hasRight("facture", "read")) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("Invoice"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; } diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 17527a26591..fae7d4894aa 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -964,9 +964,9 @@ class RemiseCheque extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowCheckReceipt"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index cbe1c9b4111..29b19528619 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -1415,9 +1415,9 @@ class Paiement extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("Payment"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index fcfffab7b7c..7e64a35e963 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -688,9 +688,9 @@ class ChargeSociales extends CommonObject if (empty($notooltip) && $user->hasRight("facture", "read")) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("SocialContribution"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; $linkclose .= ' class="classfortooltip"'; } diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 9ed504b6a13..1b68ceaf8ae 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -783,9 +783,9 @@ class Tva extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 082639332be..1e19a39b9f6 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -1571,9 +1571,9 @@ class Contact extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowContact"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 8999641d19a..a83b98fc51f 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2133,9 +2133,9 @@ class Contrat extends CommonObject if (empty($notooltip) && $user->hasRight('contrat', 'lire')) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowContract"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; } $linkstart = ''; $linkend = ''; diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 0edc34a55a3..49199c22397 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -355,9 +355,9 @@ class Fiscalyear extends CommonObject if (empty($notooltip) && $user->hasRight('accounting', 'fiscalyear', 'write')) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("FiscalPeriod"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' title="'.dolPrintHtmlForAttribute($label).'"'; $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; } diff --git a/htdocs/core/class/timespent.class.php b/htdocs/core/class/timespent.class.php index d0736d63a9c..8619d3c182e 100644 --- a/htdocs/core/class/timespent.class.php +++ b/htdocs/core/class/timespent.class.php @@ -757,9 +757,9 @@ class TimeSpent extends CommonObject if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $label = $langs->trans("ShowTimeSpent"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' alt="'.dolPrintHtmlForAttribute($label).'"'; } - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); + $linkclose .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index e6ad6bab5c4..64d1f2137fa 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2010,6 +2010,7 @@ function dolPrintText($s) /** * Return a string (that can be on several lines) ready to be output on a HTML page. * To output a text inside an attribute, you can use dolPrintHTMLForAttribute() or dolPrintHTMLForTextArea() inside a textarea + * With dolPrintHTML(), only content not already in HTML is encoded with HTML. * * @param string $s String to print * @param int $allowiframe Allow iframe tags @@ -2023,6 +2024,7 @@ function dolPrintHTML($s, $allowiframe = 0) /** * Return a string ready to be output on an HTML attribute (alt, title, data-html, ...) + * With dolPrintHTMLForAttribute(), the content is HTML encode, even if it is already HTML content. * * @param string $s String to print * @return string String ready for HTML output @@ -2032,7 +2034,7 @@ function dolPrintHTMLForAttribute($s) { // The dol_htmlentitiesbr will convert simple text into html // The dol_escape_htmltag will escape html chars. - return dol_escape_htmltag(dol_string_onlythesehtmltags(dol_htmlentitiesbr($s), 1, 0, 0, 0, array('br', 'b', 'font', 'span')), 1, -1, '', 0, 1); + return dol_escape_htmltag(dol_string_onlythesehtmltags(dol_htmlentitiesbr($s), 1, 0, 0, 0, array('br', 'b', 'font', 'hr', 'span')), 1, -1, '', 0, 1); } /** @@ -2071,7 +2073,7 @@ function dolPrintPassword($s) * @param string $stringtoescape String to escape * @param int $keepb 1=Replace b tags with escaped value (except if in $noescapetags), 0=Remove them completely * @param int $keepn 1=Preserve \r\n strings, 0=Replace them with escaped value, -1=Remove them. Set to 1 when escaping for a