Skip to content

Commit

Permalink
FIX CVE-2024-55227 and CVE-2024-55228 CSRF when
Browse files Browse the repository at this point in the history
MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY is
on (hidden option not on by default)
  • Loading branch information
eldy committed Jan 9, 2025
1 parent a1003a1 commit 56710ce
Show file tree
Hide file tree
Showing 91 changed files with 325 additions and 188 deletions.
4 changes: 2 additions & 2 deletions htdocs/accountancy/class/accountingjournal.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle
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"';
}

Expand Down
4 changes: 2 additions & 2 deletions htdocs/accountancy/class/bookkeeping.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,9 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss
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.'"' : '');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/adherents/class/adherent.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2382,9 +2382,9 @@ public function getNomUrl($withpictoimg = 0, $maxlen = 0, $option = 'card', $mod
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 : '').'"';
}

Expand Down
2 changes: 1 addition & 1 deletion htdocs/adherents/class/adherent_type.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ public function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0, $morecss
}
}
$linkstart = '<a href="'.$url.'"';
$linkstart .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
$linkstart .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"');
$linkstart .= $dataparams.' class="'.$classfortooltip.'">';

$linkend = '</a>';
Expand Down
10 changes: 5 additions & 5 deletions htdocs/admin/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@

print '<tr class="oddeven">';
print '<td>'.$langs->trans("UserMailRequired").'</td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td class="center" width="20">&nbsp;</td>';

print '<td align="center" width="100">';
print '<td class="center" width="100">';
if ($conf->use_javascript_ajax) {
print ajax_constantonoff('USER_MAIL_REQUIRED');
} else {
Expand All @@ -181,9 +181,9 @@

print '<tr class="oddeven">';
print '<td>'.$langs->trans("UserHideInactive").'</td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td class="center" width="20">&nbsp;</td>';

print '<td align="center" width="100">';
print '<td class="center" width="100">';
if ($conf->use_javascript_ajax) {
print ajax_constantonoff('USER_HIDE_INACTIVE_IN_COMBOBOX');
} else {
Expand Down Expand Up @@ -325,7 +325,7 @@
if ($module->type == 'pdf') {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
} else {
print img_object($langs->trans("PreviewNotAvailable"), 'generic');
print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic');
}
print '</td>';

Expand Down
4 changes: 2 additions & 2 deletions htdocs/asset/class/asset.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1408,9 +1408,9 @@ public function getNomUrl($withpicto = 0, $option = '', $maxlen = 0, $notooltip
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.'"' : '');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/asset/class/assetmodel.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -619,9 +619,9 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss
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.'"' : '');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/bom/class/bom.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1159,9 +1159,9 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss
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.'"' : '');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/bom/class/bomline.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,9 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss
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.'"' : '');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/bookcal/class/availabilities.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -756,9 +756,9 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss
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.'"' : '');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/bookcal/class/calendar.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -742,9 +742,9 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss
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.'"' : '');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/bookmarks/class/bookmark.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,9 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss
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.'"' : '');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/categories/class/categorie.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1811,9 +1811,9 @@ public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0, $morepar
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 : '').'"';
Expand Down
6 changes: 4 additions & 2 deletions htdocs/comm/action/class/actioncomm.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1658,6 +1658,7 @@ public function getTooltipContentArray($params)
$datas['note'] .= (dol_textishtml($texttoshow) ? str_replace(array("\r", "\n"), "", $texttoshow) : str_replace(array("\r", "\n"), '<br>', $texttoshow));
$datas['note'] .= '</div>';
}

// 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';
Expand Down Expand Up @@ -1767,6 +1768,7 @@ public function getNomUrl($withpicto = 0, $maxlength = 0, $classname = '', $opti
$tooltip .= (dol_textishtml($texttoshow) ? str_replace(array("\r", "\n"), "", $texttoshow) : str_replace(array("\r", "\n"), '<br>', $texttoshow));
$tooltip .= '</div>';
}

$linkclose = '';
$classfortooltip = 'classfortooltip';
$dataparams = '';
Expand All @@ -1784,9 +1786,9 @@ public function getNomUrl($withpicto = 0, $maxlength = 0, $classname = '', $opti
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.'"';
Expand Down
4 changes: 2 additions & 2 deletions htdocs/comm/mailing/class/mailing.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -852,9 +852,9 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss
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.'"' : '');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/comm/propal/class/propal.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -3831,9 +3831,9 @@ public function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notoo
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.'"';
}

Expand Down
4 changes: 2 additions & 2 deletions htdocs/commande/class/commande.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -3898,9 +3898,9 @@ public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $n
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');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/bank/class/account.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1597,9 +1597,9 @@ public function getNomUrl($withpicto = 0, $mode = '', $option = '', $save_lastse
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.'"' : '');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/bank/class/paymentvarious.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -724,9 +724,9 @@ public function getNomUrl($withpicto = 0, $option = '', $save_lastsearch_value =
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.'"' : '');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/cashcontrol/class/cashcontrol.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,9 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss
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.'"' : '');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/facture/class/facture.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2109,9 +2109,9 @@ public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $m
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.'"';
}

Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/paiement/cheque/class/remisecheque.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -964,9 +964,9 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss
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.'"' : '');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/paiement/class/paiement.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1415,9 +1415,9 @@ public function getNomUrl($withpicto = 0, $option = '', $mode = 'withlistofinvoi
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.'"' : '');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/sociales/class/chargesociales.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -688,9 +688,9 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $short =
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"';
}

Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/tva/class/tva.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -783,9 +783,9 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss
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.'"' : '');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/contact/class/contact.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1571,9 +1571,9 @@ public function getNomUrl($withpicto = 0, $option = '', $maxlen = 0, $moreparam
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.'"' : '');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/contrat/class/contrat.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2133,9 +2133,9 @@ public function getNomUrl($withpicto = 0, $maxlength = 0, $notooltip = 0, $save_
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 = '<a href="'.$url.'"';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/contrat/class/contratligne.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ public function getNomUrl($withpicto = 0, $maxlength = 0)
}

$link = '<a href="'.DOL_URL_ROOT.'/contrat/card.php?id='.$this->fk_contrat.'"';
$link .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
$link .= ($label ? ' title="'.dolPrintHtmlForAttribute($label).'"' : ' title="tocomplete"');
$link .= $dataparams.' class="'.$classfortooltip.'">';
$linkend = '</a>';

Expand Down
Loading

0 comments on commit 56710ce

Please sign in to comment.