diff --git a/upload/catalog/controller/extension/feed/google_sitemap.php b/upload/catalog/controller/extension/feed/google_sitemap.php index 1d9761bbfec..34ce23e186f 100644 --- a/upload/catalog/controller/extension/feed/google_sitemap.php +++ b/upload/catalog/controller/extension/feed/google_sitemap.php @@ -13,14 +13,14 @@ public function index() { foreach ($products as $product) { if ($product['image']) { $output .= ''; - $output .= ' ' . $this->url->link('product/product', 'language=' . $this->config->get('config_language') . '&product_id=' . $product['product_id']) . ''; + $output .= ' ' . htmlspecialchars($this->url->link('product/product', 'language=' . $this->config->get('config_language') . '&product_id=' . $product['product_id']), ENT_COMPAT | ENT_XML1) . ''; $output .= ' weekly'; $output .= ' ' . date('Y-m-d\TH:i:sP', strtotime($product['date_modified'])) . ''; $output .= ' 1.0'; $output .= ' '; - $output .= ' ' . $this->model_tool_image->resize($product['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_popup_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_popup_height')) . ''; - $output .= ' ' . $product['name'] . ''; - $output .= ' ' . $product['name'] . ''; + $output .= ' ' . htmlspecialchars($this->model_tool_image->resize($product['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_popup_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_popup_height')), ENT_COMPAT | ENT_XML1) . ''; + $output .= ' ' . htmlspecialchars($product['name'], ENT_COMPAT | ENT_XML1) . ''; + $output .= ' ' . htmlspecialchars($product['name'], ENT_COMPAT | ENT_XML1) . ''; $output .= ' '; $output .= ''; } @@ -36,7 +36,7 @@ public function index() { foreach ($manufacturers as $manufacturer) { $output .= ''; - $output .= ' ' . $this->url->link('product/manufacturer/info', 'language=' . $this->config->get('config_language') . '&manufacturer_id=' . $manufacturer['manufacturer_id']) . ''; + $output .= ' ' . htmlspecialchars($this->url->link('product/manufacturer/info', 'language=' . $this->config->get('config_language') . '&manufacturer_id=' . $manufacturer['manufacturer_id']), ENT_COMPAT | ENT_XML1) . ''; $output .= ' weekly'; $output .= ' 0.7'; $output .= ''; @@ -45,7 +45,7 @@ public function index() { foreach ($products as $product) { $output .= ''; - $output .= ' ' . $this->url->link('product/product', 'language=' . $this->config->get('config_language') . '&manufacturer_id=' . $manufacturer['manufacturer_id'] . '&product_id=' . $product['product_id']) . ''; + $output .= ' ' . htmlspecialchars($this->url->link('product/product', 'language=' . $this->config->get('config_language') . '&manufacturer_id=' . $manufacturer['manufacturer_id'] . '&product_id=' . $product['product_id']), ENT_COMPAT | ENT_XML1) . ''; $output .= ' weekly'; $output .= ' 1.0'; $output .= ''; @@ -58,7 +58,7 @@ public function index() { foreach ($informations as $information) { $output .= ''; - $output .= ' ' . $this->url->link('information/information', 'language=' . $this->config->get('config_language') . '&information_id=' . $information['information_id']) . ''; + $output .= ' ' . htmlspecialchars($this->url->link('information/information', 'language=' . $this->config->get('config_language') . '&information_id=' . $information['information_id']), ENT_COMPAT | ENT_XML1) . ''; $output .= ' weekly'; $output .= ' 0.5'; $output .= ''; @@ -84,7 +84,7 @@ protected function getCategories($parent_id, $current_path = '') { } $output .= ''; - $output .= ' ' . $this->url->link('product/category', 'language=' . $this->config->get('config_language') . '&path=' . $new_path) . ''; + $output .= ' ' . htmlspecialchars($this->url->link('product/category', 'language=' . $this->config->get('config_language') . '&path=' . $new_path), ENT_COMPAT | ENT_XML1) . ''; $output .= ' weekly'; $output .= ' 0.7'; $output .= ''; @@ -93,7 +93,7 @@ protected function getCategories($parent_id, $current_path = '') { foreach ($products as $product) { $output .= ''; - $output .= ' ' . $this->url->link('product/product', 'language=' . $this->config->get('config_language') . '&path=' . $new_path . '&product_id=' . $product['product_id']) . ''; + $output .= ' ' . htmlspecialchars($this->url->link('product/product', 'language=' . $this->config->get('config_language') . '&path=' . $new_path . '&product_id=' . $product['product_id']), ENT_COMPAT | ENT_XML1) . ''; $output .= ' weekly'; $output .= ' 1.0'; $output .= '';