Skip to content

Commit

Permalink
fix: remove escape html
Browse files Browse the repository at this point in the history
  • Loading branch information
tblivet committed Jan 28, 2025
1 parent 3d91468 commit 4af6d8b
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 33 deletions.
4 changes: 2 additions & 2 deletions modules/ps_contactinfo/ps_contactinfo-rich.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
<hr/>
<div class="ps-contactinfo__item">
<i class="material-icons" aria-hidden="true">&#xE0CD;</i>
<div class="ps-contactinfo__info"><a href="tel:{$contact_infos.phone|escape:'htmlall':'UTF-8'}">{$contact_infos.phone|escape:'htmlall':'UTF-8'}</a></div>
<div class="ps-contactinfo__info"><a href="tel:{$contact_infos.phone}">{$contact_infos.phone}</a></div>
</div>
{/if}
{if $contact_infos.fax}
<hr/>
<div class="ps-contactinfo__item">
<i class="material-icons" aria-hidden="true">&#xE8AD;</i>
<div class="ps-contactinfo__info">{$contact_infos.fax|escape:'htmlall':'UTF-8'}</div>
<div class="ps-contactinfo__info">{$contact_infos.fax}</div>
</div>
{/if}
{if $contact_infos.email && $display_email}
Expand Down
4 changes: 2 additions & 2 deletions modules/ps_contactinfo/ps_contactinfo.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
{if $contact_infos.phone}
<div class="ps-contactinfo__phone">
<i class="material-icons" aria-hidden="true">phone</i>
<a href="tel:{$contact_infos.phone|escape:'htmlall':'UTF-8'}">{$contact_infos.phone|escape:'htmlall':'UTF-8'}</a>
<a href="tel:{$contact_infos.phone}">{$contact_infos.phone}</a>
</div>
{/if}

{if $contact_infos.fax}
<div class="ps-contactinfo__fax">
<i class="material-icons" aria-hidden="true">&#xE8AD;</i>
<a href="fax:{$contact_infos.fax|escape:'htmlall':'UTF-8'}">{$contact_infos.fax|escape:'htmlall':'UTF-8'}</a>
<a href="fax:{$contact_infos.fax}">{$contact_infos.fax}</a>
</div>
{/if}

Expand Down
48 changes: 24 additions & 24 deletions modules/ps_mainmenu/ps_mainmenu.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
{if $parent.depth === 1}
{foreach from=$links item=link}
{if $link.depth === 3 && $link.children|count}
<div class="{$class|escape:'htmlall':'UTF-8'}__group--child">
<div class="{$class}__group--child">
{elseif $link.depth === 3 && !$link.children|count}
<div class="{$class|escape:'htmlall':'UTF-8'}__group--nochild">
<div class="{$class}__group--nochild">
{/if}

<a
class="{$class|escape:'htmlall':'UTF-8'} {if $link.depth === 3}{$class|escape:'htmlall':'UTF-8'}__group-main-item{/if}"
href="{$link.url|escape:'htmlall':'UTF-8'}"
data-depth="{$link.depth|escape:'htmlall':'UTF-8'}"
class="{$class} {if $link.depth === 3}{$class}__group-main-item{/if}"
href="{$link.url}"
data-depth="{$link.depth}"
{if $link.open_in_new_window}target="_blank"{/if}
>
{$link.label|escape:'htmlall':'UTF-8'}
{$link.label}
</a>
{call name=generateLinks links=$link.children parent=$parent}

Expand All @@ -40,12 +40,12 @@
{foreach from=$nodes item=node}
<a
class="submenu__left-item {if $node.children|count}has-child{/if}"
href="{$node.url|escape:'htmlall':'UTF-8'}"
data-depth="{$node.depth|escape:'htmlall':'UTF-8'}"
{if $node.children|count}data-open-tab="submenu_{$node.label|lower|classname|escape:'htmlall':'UTF-8'}_{$node.depth|escape:'htmlall':'UTF-8'}_{$node.page_identifier}"{/if}
href="{$node.url}"
data-depth="{$node.depth}"
{if $node.children|count}data-open-tab="submenu_{$node.label|lower|classname}_{$node.depth}_{$node.page_identifier}"{/if}
{if $node.open_in_new_window}target="_blank"{/if}
>
{$node.label|escape:'htmlall':'UTF-8'}
{$node.label}
</a>
{/foreach}
</div>
Expand All @@ -54,7 +54,7 @@
{if $depth === 1 }
<div class="submenu__right col-sm-9">
{foreach from=$nodes item=node}
<div class="submenu__right-items" data-id="submenu_{$node.label|lower|classname|escape:'htmlall':'UTF-8'}_{$node.depth|escape:'htmlall':'UTF-8'}_{$node.page_identifier}">
<div class="submenu__right-items" data-id="submenu_{$node.label|lower|classname}_{$node.depth}_{$node.page_identifier}">
{generateLinks links=$node.children parent=$parent}
</div>
{/foreach}
Expand All @@ -80,14 +80,14 @@
{if $itemsFirstLevel|count}
<ul class="ps-mainmenu__tree" id="top-menu" data-depth="0">
{foreach from=$itemsFirstLevel item=menuItem}
<li class="ps-mainmenu__tree__item type-{$menuItem.type|escape:'htmlall':'UTF-8'} {if $menuItem.current} current{/if}" data-id="{$menuItem.page_identifier|escape:'htmlall':'UTF-8'}">
<li class="ps-mainmenu__tree__item type-{$menuItem.type} {if $menuItem.current} current{/if}" data-id="{$menuItem.page_identifier}">
<a
class="ps-mainmenu__tree__link{if $menuItem.children|count} dropdown-toggle{/if}"
href="{$menuItem.url|escape:'htmlall':'UTF-8'}"
href="{$menuItem.url}"
data-depth="0"
{if $menuItem.open_in_new_window}target="_blank"{/if}
>
{$menuItem.label|escape:'htmlall':'UTF-8'}
{$menuItem.label}
</a>

{desktopSubMenu nodes=$menuItem.children depth=$menuItem.depth parent=$menuItem}
Expand All @@ -108,31 +108,31 @@
{if $nodes|count}
<nav
class="menu menu--mobile{if $depth === 0} menu--current js-menu-current{else} menu--child js-menu-child{/if}"
{if $depth === 0}id="menu-mobile"{else}data-parent-title="{$parent.label|escape:'htmlall':'UTF-8'}"{/if}
{if $depth > 1}data-back-title="{$backTitle|escape:'htmlall':'UTF-8'}" data-id="{$expandId|escape:'htmlall':'UTF-8'}"{/if}
data-depth="{$depth|escape:'htmlall':'UTF-8'}"
{if $depth === 0}id="menu-mobile"{else}data-parent-title="{$parent.label}"{/if}
{if $depth > 1}data-back-title="{$backTitle}" data-id="{$expandId}"{/if}
data-depth="{$depth}"
>
<ul class="menu__list">
{if $depth >= 1}
<li class="menu__title">{$parent.label|escape:'htmlall':'UTF-8'}</li>
<li class="menu__title">{$parent.label}</li>
{/if}
{foreach from=$nodes item=node}
<li
class="type-{$node.type|escape:'htmlall':'UTF-8'} {if $node.current} current{/if} {if $node.children|count} menu--childrens{/if}"
id="{$node.page_identifier|escape:'htmlall':'UTF-8'}"
class="type-{$node.type} {if $node.current} current{/if} {if $node.children|count} menu--childrens{/if}"
id="{$node.page_identifier}"
>
<a
class="{if $depth>= 0}menu__link{/if}"
href="{$node.url|escape:'htmlall':'UTF-8'}"
data-depth="{$depth|escape:'htmlall':'UTF-8'}"
href="{$node.url}"
data-depth="{$depth}"
{if $node.open_in_new_window}target="_blank"{/if}
>
{$node.label|escape:'htmlall':'UTF-8'}
{$node.label}
</a>
{if $node.children|count}
{* Cannot use page identifier as we can have the same page several times *}
{assign var=_expand_id value=10|mt_rand:100000}
<button class="menu__toggle-child btn btn-link js-menu-open-child" data-target="{$_expand_id|escape:'htmlall':'UTF-8'}">
<button class="menu__toggle-child btn btn-link js-menu-open-child" data-target="{$_expand_id}">
<i class="material-icons rtl-flip">chevron_right</i>
</button>
{/if}
Expand Down
6 changes: 3 additions & 3 deletions modules/ps_searchbar/ps_searchbar.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
*}

<div id="_desktop_ps_searchbar" class="order-2 ms-auto col-auto d-none d-md-flex align-items-center">
<div id="ps_searchbar" class="ps-searchbar js-search-widget" data-search-controller-url="{$search_controller_url|escape:'htmlall':'UTF-8'}">
<form class="ps-searchbar__form" method="get" action="{$search_controller_url|escape:'htmlall':'UTF-8'}">
<div id="ps_searchbar" class="ps-searchbar js-search-widget" data-search-controller-url="{$search_controller_url}">
<form class="ps-searchbar__form" method="get" action="{$search_controller_url}">
<input type="hidden" name="controller" value="search">
<i class="material-icons ps-searchbar__magnifier js-search-icon" aria-hidden="true">search</i>
<i class="material-icons ps-searchbar__clear js-search-clear d-none" aria-hidden="true">clear</i>
<input class="js-search-input form-control ps-searchbar__input" type="text" name="s" value="{$search_string|escape:'htmlall':'UTF-8'}" placeholder="{l s='Search our catalog' d='Shop.Theme.Catalog'}" aria-label="{l s='Search' d='Shop.Theme.Catalog'}">
<input class="js-search-input form-control ps-searchbar__input" type="text" name="s" value="{$search_string}" placeholder="{l s='Search our catalog' d='Shop.Theme.Catalog'}" aria-label="{l s='Search' d='Shop.Theme.Catalog'}">
</form>

<div class="ps-searchbar__dropdown js-search-dropdown d-none">
Expand Down
4 changes: 2 additions & 2 deletions templates/_partials/header.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<div id="_mobile_ps_customersignin" class="d-md-none d-flex col-auto">
{* JUST PLACEHOLDER FOR RESPONSIVE COMPONENT TO LOAD REAL ONE *}
<div class="header-block">
<a href="{$urls.pages.my_account|escape:'htmlall':'UTF-8'}" class="header-block__action-btn">
<a href="{$urls.pages.my_account}" class="header-block__action-btn">
<i class="material-icons header-block__icon" aria-hidden="true">account_circle</i>
</a>
</div>
Expand All @@ -81,7 +81,7 @@
<div id="_mobile_ps_shoppingcart" class="d-md-none d-flex col-auto">
{* JUST PLACEHOLDER FOR RESPONSIVE COMPONENT TO LOAD REAL ONE *}
<div class="header-block">
<a href="{$urls.pages.cart|escape:'htmlall':'UTF-8'}" class="header-block__action-btn">
<a href="{$urls.pages.cart}" class="header-block__action-btn">
<i class="material-icons header-block__icon" aria-hidden="true">shopping_cart</i>
<span class="header-block__badge">{$cart.products_count}</span>
</a>
Expand Down

0 comments on commit 4af6d8b

Please sign in to comment.