diff --git a/components/com_contact/tmpl/category/default_items.php b/components/com_contact/tmpl/category/default_items.php index 02bbbd0d48aa8..b8936a325f095 100644 --- a/components/com_contact/tmpl/category/default_items.php +++ b/components/com_contact/tmpl/category/default_items.php @@ -12,6 +12,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; +use Joomla\CMS\Layout\LayoutHelper; use Joomla\CMS\Router\Route; use Joomla\CMS\Uri\Uri; use Joomla\Component\Contact\Administrator\Helper\ContactHelper; @@ -99,7 +100,14 @@ class="inputbox" onchange="document.adminForm.submit();" params->get('show_image_heading')) : ?> image) : ?> - image, '', array('class' => 'contact-thumbnail img-thumbnail')); ?> + $item->image, + 'alt' => '', + 'class' => 'contact-thumbnail img-thumbnail', + ] + ); ?> escape($item->name); ?> diff --git a/components/com_contact/tmpl/contact/default.php b/components/com_contact/tmpl/contact/default.php index 0299548b3421e..24d326583bdbe 100644 --- a/components/com_contact/tmpl/contact/default.php +++ b/components/com_contact/tmpl/contact/default.php @@ -14,6 +14,7 @@ use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\FileLayout; +use Joomla\CMS\Layout\LayoutHelper; use Joomla\CMS\Plugin\PluginHelper; use Joomla\CMS\Router\Route; use Joomla\Component\Contact\Site\Helper\RouteHelper; @@ -97,11 +98,13 @@ item->image && $tparams->get('show_image')) : ?>
- item->image, - htmlspecialchars($this->item->name, ENT_QUOTES, 'UTF-8'), - array('itemprop' => 'image') + $this->item->image, + 'alt' => $this->item->name, + 'itemprop' => 'image', + ] ); ?>
diff --git a/components/com_content/tmpl/category/blog.php b/components/com_content/tmpl/category/blog.php index 5456cf33e9d61..cd6d656572c82 100644 --- a/components/com_content/tmpl/category/blog.php +++ b/components/com_content/tmpl/category/blog.php @@ -13,6 +13,7 @@ use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\FileLayout; +use Joomla\CMS\Layout\LayoutHelper; $app = Factory::getApplication(); @@ -54,8 +55,13 @@ params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
params->get('show_description_image') && $this->category->getParams()->get('image')) : ?> - category->getParams()->get('image_alt')) && empty($this->category->getParams()->get('image_alt_empty')) ? '' : 'alt="' . htmlspecialchars($this->category->getParams()->get('image_alt'), ENT_COMPAT, 'UTF-8') . '"'; ?> - > + $this->category->getParams()->get('image'), + 'alt' => empty($this->category->getParams()->get('image_alt')) && empty($this->category->getParams()->get('image_alt_empty')) ? false : $this->category->getParams()->get('image_alt'), + ] + ); ?> params->get('show_description') && $this->category->description) : ?> @@ -78,12 +84,11 @@ lead_items)) : ?>
lead_items as &$item) : ?> -