diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php
index bfcb751f9a9..5a965714f84 100644
--- a/htdocs/admin/dolistore/class/dolistore.class.php
+++ b/htdocs/admin/dolistore/class/dolistore.class.php
@@ -217,15 +217,15 @@ class Dolistore
for ($i = 0; $i < $nbofcateg; $i++) {
$cat = $this->categories[$i];
if ($cat->is_root_category == 1 && $parent == 0) {
- $html .= '
';
+ $html .= '';
$html .= self::get_categories($cat->id);
$html .= "\n";
} elseif (trim($cat->id_parent) == $parent && $cat->active == 1 && trim($cat->id_parent) != 0) { // si cat est de ce niveau
$select = ($cat->id == $this->categorie) ? ' selected' : '';
- $html .= 'description->language[$this->lang - 1])).'" ';
- $html .= '>'.$cat->name->language[$this->lang - 1].' '.$cat->nb_products_recursive.'';
+ $html .= '>'.dol_escape_htmltag($cat->name->language[$this->lang - 1]).' '.dol_escape_htmltag($cat->nb_products_recursive).'';
$html .= self::get_categories($cat->id);
$html .= "\n";
}
@@ -267,9 +267,9 @@ class Dolistore
// add image or default ?
if ($product->id_default_image != '') {
- $image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.$product->id.'&id_image='.$product->id_default_image;
- $images = '';
- $images .= '
';
+ $image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.((int) $product->id).'&id_image='.((int) $product->id_default_image);
+ $images = '';
+ $images .= '
';
} else {
$images = '
';
}
@@ -277,11 +277,11 @@ class Dolistore
// free or pay ?
if ($product->price > 0) {
$price = ''.price(price2num($product->price, 'MT'), 0, $langs, 1, -1, -1, 'EUR').' '.$langs->trans("HT").'
';
- $download_link = '
';
+ $download_link = '
';
} else {
$price = ''.$langs->trans('Free').'
';
- $download_link = '
';
- $download_link .= '
';
+ $download_link = '
';
+ $download_link .= '
';
}
//checking versions
@@ -319,14 +319,14 @@ class Dolistore
//.'
'.$langs->trans("SeeInMarkerPlace").'
//output template
- $html .= '
- '.$newapp.$images.' |
- '.$product->name->language[$this->lang - 1]
- .' '.$version.'
- '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.$product->reference.' - '.$langs->trans('Id').': '.$product->id.'
'.$product->description_short->language[$this->lang - 1].' | ';
+ $html .= '
+ '.dol_escape_htmltag($newapp.$images).' |
+ '.dol_escape_htmltag($product->name->language[$this->lang - 1])
+ .' '.dol_escape_htmltag($version).'
+ '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.dol_escape_htmltag($product->reference).' - '.dol_escape_htmltag($langs->trans('Id')).': '.((int) $product->id).'
'.dol_escape_htmltag($product->description_short->language[$this->lang - 1]).' | ';
// do not load if display none
//$html .= ''.$product->description->language[$this->lang - 1].' | ';
- $html .= ''.$price.' | ';
+ $html .= ''.dol_escape_htmltag($price).' | ';
$html .= ''.$download_link.' | ';
$html .= '
';
}
@@ -343,7 +343,7 @@ class Dolistore
public function get_previous_link($text = '<<')
{
// phpcs:enable
- return ''.$text.'';
+ return ''.dol_escape_htmltag($text).'';
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
@@ -356,7 +356,7 @@ class Dolistore
public function get_next_link($text = '>>')
{
// phpcs:enable
- return ''.$text.'';
+ return ''.dol_escape_htmltag($text).'';
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index dd6b22f7634..53cbc1aad69 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -1025,16 +1025,16 @@ if ($mode == 'marketplace') {
print '